Update to v8.2.93
This commit is contained in:
316
unifi/device.generated.go
generated
316
unifi/device.generated.go
generated
@@ -39,6 +39,7 @@ type Device struct {
|
||||
Disabled bool `json:"disabled,omitempty"`
|
||||
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id,omitempty"` // [\d\w]+|
|
||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
||||
EtherLighting DeviceEtherLighting `json:"ether_lighting,omitempty"`
|
||||
EthernetOverrides []DeviceEthernetOverrides `json:"ethernet_overrides,omitempty"`
|
||||
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
||||
GatewayVrrpMode string `json:"gateway_vrrp_mode,omitempty"` // primary|secondary
|
||||
@@ -81,8 +82,11 @@ type Device struct {
|
||||
OutletEnabled bool `json:"outlet_enabled,omitempty"`
|
||||
OutletOverrides []DeviceOutletOverrides `json:"outlet_overrides,omitempty"`
|
||||
OutletPowerCycleEnabled bool `json:"outlet_power_cycle_enabled,omitempty"`
|
||||
PeerToPeerMode string `json:"peer_to_peer_mode,omitempty"` // ap|sta
|
||||
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
||||
PortOverrides []DevicePortOverrides `json:"port_overrides"`
|
||||
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
||||
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
||||
PowerSourceCtrlBudget int `json:"power_source_ctrl_budget,omitempty"` // [0-9]|[1-9][0-9]|[1-9][0-9][0-9]
|
||||
PowerSourceCtrlEnabled bool `json:"power_source_ctrl_enabled,omitempty"`
|
||||
RADIUSProfileID string `json:"radiusprofile_id,omitempty"`
|
||||
RadioTable []DeviceRadioTable `json:"radio_table,omitempty"`
|
||||
@@ -97,7 +101,6 @@ type Device struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
UbbPairName string `json:"ubb_pair_name,omitempty"` // .{1,128}
|
||||
Volume int `json:"volume,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
WLANOverrides []DeviceWLANOverrides `json:"wlan_overrides,omitempty"`
|
||||
X float64 `json:"x,omitempty"`
|
||||
XBaresipPassword string `json:"x_baresip_password,omitempty"` // ^[a-zA-Z0-9_.\-!~*'()]*
|
||||
Y float64 `json:"y,omitempty"`
|
||||
@@ -115,6 +118,7 @@ func (dst *Device) UnmarshalJSON(b []byte) error {
|
||||
LtePoe booleanishString `json:"lte_poe"`
|
||||
LteSimPin emptyStringInt `json:"lte_sim_pin"`
|
||||
LteSoftLimit emptyStringInt `json:"lte_soft_limit"`
|
||||
PowerSourceCtrlBudget emptyStringInt `json:"power_source_ctrl_budget"`
|
||||
StpPriority numberOrString `json:"stp_priority"`
|
||||
Volume emptyStringInt `json:"volume"`
|
||||
|
||||
@@ -136,6 +140,7 @@ func (dst *Device) UnmarshalJSON(b []byte) error {
|
||||
dst.LtePoe = bool(aux.LtePoe)
|
||||
dst.LteSimPin = int(aux.LteSimPin)
|
||||
dst.LteSoftLimit = int(aux.LteSoftLimit)
|
||||
dst.PowerSourceCtrlBudget = int(aux.PowerSourceCtrlBudget)
|
||||
dst.StpPriority = string(aux.StpPriority)
|
||||
dst.Volume = int(aux.Volume)
|
||||
|
||||
@@ -189,6 +194,31 @@ func (dst *DeviceConnectedBatteryOverrides) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceEtherLighting struct {
|
||||
Behavior string `json:"behavior,omitempty"` // breath|steady
|
||||
Brightness int `json:"brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
||||
Mode string `json:"mode,omitempty"` // speed|network
|
||||
}
|
||||
|
||||
func (dst *DeviceEtherLighting) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceEtherLighting
|
||||
aux := &struct {
|
||||
Brightness emptyStringInt `json:"brightness"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.Brightness = int(aux.Brightness)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceEthernetOverrides struct {
|
||||
Ifname string `json:"ifname,omitempty"` // eth[0-9]{1,2}
|
||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?|WAN[2]?
|
||||
@@ -237,46 +267,49 @@ func (dst *DeviceOutletOverrides) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
type DevicePortOverrides struct {
|
||||
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-8]
|
||||
Autoneg bool `json:"autoneg,omitempty"`
|
||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
||||
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
||||
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
|
||||
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled,omitempty"`
|
||||
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||
FullDuplex bool `json:"full_duplex,omitempty"`
|
||||
Isolation bool `json:"isolation,omitempty"`
|
||||
LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
|
||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled,omitempty"`
|
||||
MirrorPortIDX int `json:"mirror_port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||
NATiveNetworkID string `json:"native_networkconf_id,omitempty"`
|
||||
Name string `json:"name,omitempty"` // .{0,128}
|
||||
OpMode string `json:"op_mode,omitempty"` // switch|mirror|aggregate
|
||||
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
||||
PortIDX int `json:"port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||
PortProfileID string `json:"portconf_id,omitempty"` // [\d\w]+
|
||||
PortSecurityEnabled bool `json:"port_security_enabled,omitempty"`
|
||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
ShowTrafficRestrictionAsAllowlist bool `json:"show_traffic_restriction_as_allowlist,omitempty"`
|
||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled,omitempty"`
|
||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlBroadcastastRate int `json:"stormctrl_bcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled,omitempty"`
|
||||
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlMcastRate int `json:"stormctrl_mcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled,omitempty"`
|
||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlUcastRate int `json:"stormctrl_ucast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StpPortMode bool `json:"stp_port_mode,omitempty"`
|
||||
VoiceNetworkID string `json:"voice_networkconf_id,omitempty"`
|
||||
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [1-8]
|
||||
Autoneg bool `json:"autoneg,omitempty"`
|
||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
||||
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
||||
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
|
||||
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled,omitempty"`
|
||||
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||
FecMode string `json:"fec_mode,omitempty"` // rs-fec|fc-fec|default|disabled
|
||||
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||
FullDuplex bool `json:"full_duplex,omitempty"`
|
||||
Isolation bool `json:"isolation,omitempty"`
|
||||
LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
|
||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled,omitempty"`
|
||||
MirrorPortIDX int `json:"mirror_port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||
NATiveNetworkID string `json:"native_networkconf_id,omitempty"`
|
||||
Name string `json:"name,omitempty"` // .{0,128}
|
||||
OpMode string `json:"op_mode,omitempty"` // switch|mirror|aggregate
|
||||
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
||||
PortIDX int `json:"port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||
PortKeepaliveEnabled bool `json:"port_keepalive_enabled,omitempty"`
|
||||
PortProfileID string `json:"portconf_id,omitempty"` // [\d\w]+
|
||||
PortSecurityEnabled bool `json:"port_security_enabled,omitempty"`
|
||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
QOSProfile DeviceQOSProfile `json:"qos_profile,omitempty"`
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled,omitempty"`
|
||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlBroadcastastRate int `json:"stormctrl_bcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled,omitempty"`
|
||||
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlMcastRate int `json:"stormctrl_mcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled,omitempty"`
|
||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlUcastRate int `json:"stormctrl_ucast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StpPortMode bool `json:"stp_port_mode,omitempty"`
|
||||
TaggedVLANMgmt string `json:"tagged_vlan_mgmt,omitempty"` // auto|block_all|custom
|
||||
VoiceNetworkID string `json:"voice_networkconf_id,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
||||
@@ -328,24 +361,157 @@ func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceQOSMarking struct {
|
||||
CosCode int `json:"cos_code,omitempty"` // [0-7]
|
||||
DscpCode int `json:"dscp_code,omitempty"` // 0|8|16|24|32|40|48|56|10|12|14|18|20|22|26|28|30|34|36|38|44|46
|
||||
IPPrecedenceCode int `json:"ip_precedence_code,omitempty"` // [0-7]
|
||||
Queue int `json:"queue,omitempty"` // [0-7]
|
||||
}
|
||||
|
||||
func (dst *DeviceQOSMarking) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceQOSMarking
|
||||
aux := &struct {
|
||||
CosCode emptyStringInt `json:"cos_code"`
|
||||
DscpCode emptyStringInt `json:"dscp_code"`
|
||||
IPPrecedenceCode emptyStringInt `json:"ip_precedence_code"`
|
||||
Queue emptyStringInt `json:"queue"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.CosCode = int(aux.CosCode)
|
||||
dst.DscpCode = int(aux.DscpCode)
|
||||
dst.IPPrecedenceCode = int(aux.IPPrecedenceCode)
|
||||
dst.Queue = int(aux.Queue)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceQOSMatching struct {
|
||||
CosCode int `json:"cos_code,omitempty"` // [0-7]
|
||||
DscpCode int `json:"dscp_code,omitempty"` // [0-9]|[1-5][0-9]|6[0-3]
|
||||
DstPort int `json:"dst_port,omitempty"` // [0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-4]|65535
|
||||
IPPrecedenceCode int `json:"ip_precedence_code,omitempty"` // [0-7]
|
||||
Protocol string `json:"protocol,omitempty"` // ([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|ah|ax.25|dccp|ddp|egp|eigrp|encap|esp|etherip|fc|ggp|gre|hip|hmp|icmp|idpr-cmtp|idrp|igmp|igp|ip|ipcomp|ipencap|ipip|ipv6|ipv6-frag|ipv6-icmp|ipv6-nonxt|ipv6-opts|ipv6-route|isis|iso-tp4|l2tp|manet|mobility-header|mpls-in-ip|ospf|pim|pup|rdp|rohc|rspf|rsvp|sctp|shim6|skip|st|tcp|udp|udplite|vmtp|vrrp|wesp|xns-idp|xtp
|
||||
SrcPort int `json:"src_port,omitempty"` // [0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-4]|65535
|
||||
}
|
||||
|
||||
func (dst *DeviceQOSMatching) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceQOSMatching
|
||||
aux := &struct {
|
||||
CosCode emptyStringInt `json:"cos_code"`
|
||||
DscpCode emptyStringInt `json:"dscp_code"`
|
||||
DstPort emptyStringInt `json:"dst_port"`
|
||||
IPPrecedenceCode emptyStringInt `json:"ip_precedence_code"`
|
||||
SrcPort emptyStringInt `json:"src_port"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.CosCode = int(aux.CosCode)
|
||||
dst.DscpCode = int(aux.DscpCode)
|
||||
dst.DstPort = int(aux.DstPort)
|
||||
dst.IPPrecedenceCode = int(aux.IPPrecedenceCode)
|
||||
dst.SrcPort = int(aux.SrcPort)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceQOSPolicies struct {
|
||||
QOSMarking DeviceQOSMarking `json:"qos_marking,omitempty"`
|
||||
QOSMatching DeviceQOSMatching `json:"qos_matching,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceQOSPolicies) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceQOSPolicies
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceQOSProfile struct {
|
||||
QOSPolicies []DeviceQOSPolicies `json:"qos_policies,omitempty"`
|
||||
QOSProfileMode string `json:"qos_profile_mode,omitempty"` // custom|unifi_play|aes67_audio|crestron_audio_video|dante_audio|ndi_aes67_audio|ndi_dante_audio|qsys_audio_video|qsys_video_dante_audio|sdvoe_aes67_audio|sdvoe_dante_audio|shure_audio
|
||||
}
|
||||
|
||||
func (dst *DeviceQOSProfile) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceQOSProfile
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceRadioIDentifiers struct {
|
||||
DeviceID string `json:"device_id,omitempty"`
|
||||
RadioName string `json:"radio_name,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceRadioIDentifiers) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceRadioIDentifiers
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceRadioTable struct {
|
||||
AntennaGain int `json:"antenna_gain,omitempty"` // ^-?([0-9]|[1-9][0-9])
|
||||
AntennaID int `json:"antenna_id,omitempty"` // -1|[0-9]
|
||||
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|4.5|5|16|21|33|34|36|37|38|40|41|42|44|45|46|48|49|52|53|56|57|60|61|64|65|69|73|77|81|85|89|93|97|100|101|104|105|108|109|112|113|117|116|120|121|124|125|128|129|132|133|136|137|140|141|144|145|149|153|157|161|165|169|173|177|181|183|184|185|187|188|189|192|193|196|197|201|205|209|213|217|221|225|229|233|auto
|
||||
Channel string `json:"channel,omitempty"` // [0-9]|[1][0-4]|4.5|5|16|21|33|34|36|37|38|40|41|42|44|45|46|48|49|52|53|56|57|60|61|64|65|69|73|77|81|85|89|93|97|100|101|104|105|108|109|112|113|117|116|120|121|124|125|128|129|132|133|136|137|140|141|144|145|149|153|157|161|165|169|173|177|181|183|184|185|187|188|189|192|193|196|197|201|205|209|213|217|221|225|229|233|auto
|
||||
HardNoiseFloorEnabled bool `json:"hard_noise_floor_enabled,omitempty"`
|
||||
Ht int `json:"ht,omitempty"` // 20|40|80|160|1080|2160|4320
|
||||
LoadbalanceEnabled bool `json:"loadbalance_enabled,omitempty"`
|
||||
Maxsta int `json:"maxsta,omitempty"` // [1-9]|[1-9][0-9]|1[0-9]{2}|200|^$
|
||||
MinRssi int `json:"min_rssi,omitempty"` // ^-(6[7-9]|[7-8][0-9]|90)$
|
||||
MinRssiEnabled bool `json:"min_rssi_enabled,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Radio string `json:"radio,omitempty"` // ng|na|ad|6e
|
||||
SensLevel int `json:"sens_level,omitempty"` // ^-([5-8][0-9]|90)$
|
||||
SensLevelEnabled bool `json:"sens_level_enabled,omitempty"`
|
||||
TxPower string `json:"tx_power,omitempty"` // [\d]+|auto
|
||||
TxPowerMode string `json:"tx_power_mode,omitempty"` // auto|medium|high|low|custom
|
||||
VwireEnabled bool `json:"vwire_enabled,omitempty"`
|
||||
AntennaGain int `json:"antenna_gain,omitempty"` // ^-?([0-9]|[1-9][0-9])
|
||||
AntennaID int `json:"antenna_id,omitempty"` // -1|[0-9]
|
||||
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|4.5|5|16|21|33|34|36|37|38|40|41|42|44|45|46|48|49|52|53|56|57|60|61|64|65|69|73|77|81|85|89|93|97|100|101|104|105|108|109|112|113|117|116|120|121|124|125|128|129|132|133|136|137|140|141|144|145|149|153|157|161|165|169|173|177|181|183|184|185|187|188|189|192|193|196|197|201|205|209|213|217|221|225|229|233|auto
|
||||
Channel string `json:"channel,omitempty"` // [0-9]|[1][0-4]|4.5|5|16|21|33|34|36|37|38|40|41|42|44|45|46|48|49|52|53|56|57|60|61|64|65|69|73|77|81|85|89|93|97|100|101|104|105|108|109|112|113|117|116|120|121|124|125|128|129|132|133|136|137|140|141|144|145|149|153|157|161|165|169|173|177|181|183|184|185|187|188|189|192|193|196|197|201|205|209|213|217|221|225|229|233|auto
|
||||
ChannelOptimizationEnabled bool `json:"channel_optimization_enabled,omitempty"`
|
||||
HardNoiseFloorEnabled bool `json:"hard_noise_floor_enabled,omitempty"`
|
||||
Ht int `json:"ht,omitempty"` // 20|40|80|160|240|320|1080|2160|4320
|
||||
LoadbalanceEnabled bool `json:"loadbalance_enabled,omitempty"`
|
||||
Maxsta int `json:"maxsta,omitempty"` // [1-9]|[1-9][0-9]|1[0-9]{2}|200|^$
|
||||
MinRssi int `json:"min_rssi,omitempty"` // ^-(6[7-9]|[7-8][0-9]|90)$
|
||||
MinRssiEnabled bool `json:"min_rssi_enabled,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Radio string `json:"radio,omitempty"` // ng|na|ad|6e
|
||||
RadioIDentifiers []DeviceRadioIDentifiers `json:"radio_identifiers,omitempty"`
|
||||
SensLevel int `json:"sens_level,omitempty"` // ^-([5-8][0-9]|90)$
|
||||
SensLevelEnabled bool `json:"sens_level_enabled,omitempty"`
|
||||
TxPower string `json:"tx_power,omitempty"` // [\d]+|auto
|
||||
TxPowerMode string `json:"tx_power_mode,omitempty"` // auto|medium|high|low|custom
|
||||
VwireEnabled bool `json:"vwire_enabled,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceRadioTable) UnmarshalJSON(b []byte) error {
|
||||
@@ -429,38 +595,6 @@ func (dst *DeviceRpsPortTable) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceWLANOverrides struct {
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
Name string `json:"name,omitempty"` // .{1,32}
|
||||
NameCombineEnabled bool `json:"name_combine_enabled,omitempty"`
|
||||
NameCombineSuffix string `json:"name_combine_suffix,omitempty"` // .{0,8}
|
||||
Radio string `json:"radio,omitempty"` // ng|na
|
||||
RadioName string `json:"radio_name,omitempty"`
|
||||
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-5]|^$
|
||||
VLANEnabled bool `json:"vlan_enabled,omitempty"`
|
||||
WLANID string `json:"wlan_id,omitempty"` // [\d\w]+
|
||||
XPassphrase string `json:"x_passphrase,omitempty"` // [\x20-\x7E]{8,255}|[0-9a-fA-F]{64}
|
||||
}
|
||||
|
||||
func (dst *DeviceWLANOverrides) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceWLANOverrides
|
||||
aux := &struct {
|
||||
VLAN emptyStringInt `json:"vlan"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.VLAN = int(aux.VLAN)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) listDevice(ctx context.Context, site string) ([]Device, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
|
||||
2
unifi/dynamic_dns.generated.go
generated
2
unifi/dynamic_dns.generated.go
generated
@@ -31,7 +31,7 @@ type DynamicDNS struct {
|
||||
Login string `json:"login,omitempty"` // ^[^"' ]+$
|
||||
Options []string `json:"options,omitempty"` // ^[^"' ]+$
|
||||
Server string `json:"server"` // ^[^"' ]+$|^$
|
||||
Service string `json:"service,omitempty"` // afraid|changeip|cloudflare|dnspark|dslreports|dyndns|easydns|googledomains|namecheap|noip|sitelutions|zoneedit|custom
|
||||
Service string `json:"service,omitempty"` // afraid|changeip|cloudflare|cloudxns|ddnss|dhis|dnsexit|dnsomatic|dnspark|dnspod|dslreports|dtdns|duckdns|duiadns|dyn|dyndns|dynv6|easydns|freemyip|googledomains|loopia|namecheap|noip|nsupdate|ovh|sitelutions|spdyn|strato|tunnelbroker|zoneedit|custom
|
||||
XPassword string `json:"x_password,omitempty"` // ^[^"' ]+$
|
||||
}
|
||||
|
||||
|
||||
2
unifi/firewall_rule.generated.go
generated
2
unifi/firewall_rule.generated.go
generated
@@ -44,7 +44,7 @@ type FirewallRule struct {
|
||||
Protocol string `json:"protocol"` // ^$|all|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|tcp_udp|ah|ax.25|dccp|ddp|egp|eigrp|encap|esp|etherip|fc|ggp|gre|hip|hmp|icmp|idpr-cmtp|idrp|igmp|igp|ip|ipcomp|ipencap|ipip|ipv6|ipv6-frag|ipv6-icmp|ipv6-nonxt|ipv6-opts|ipv6-route|isis|iso-tp4|l2tp|manet|mobility-header|mpls-in-ip|ospf|pim|pup|rdp|rohc|rspf|rsvp|sctp|shim6|skip|st|tcp|udp|udplite|vmtp|vrrp|wesp|xns-idp|xtp
|
||||
ProtocolMatchExcepted bool `json:"protocol_match_excepted"`
|
||||
ProtocolV6 string `json:"protocol_v6"` // ^$|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|ah|all|dccp|eigrp|esp|gre|icmpv6|ipcomp|ipv6|ipv6-frag|ipv6-icmp|ipv6-nonxt|ipv6-opts|ipv6-route|isis|l2tp|manet|mobility-header|mpls-in-ip|ospf|pim|rsvp|sctp|shim6|tcp|tcp_udp|udp|vrrp
|
||||
RuleIndex int `json:"rule_index,omitempty"` // 2[0-9]{3}|4[0-9]{3}
|
||||
RuleIndex int `json:"rule_index,omitempty"` // 2[0-9]{3,4}|4[0-9]{3,4}
|
||||
Ruleset string `json:"ruleset,omitempty"` // WAN_IN|WAN_OUT|WAN_LOCAL|LAN_IN|LAN_OUT|LAN_LOCAL|GUEST_IN|GUEST_OUT|GUEST_LOCAL|WANv6_IN|WANv6_OUT|WANv6_LOCAL|LANv6_IN|LANv6_OUT|LANv6_LOCAL|GUESTv6_IN|GUESTv6_OUT|GUESTv6_LOCAL
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
SrcAddress string `json:"src_address,omitempty"`
|
||||
|
||||
477
unifi/network.generated.go
generated
477
unifi/network.generated.go
generated
@@ -25,216 +25,273 @@ type Network struct {
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
AutoScaleEnabled bool `json:"auto_scale_enabled"`
|
||||
DHCPDBootEnabled bool `json:"dhcpd_boot_enabled"`
|
||||
DHCPDBootFilename string `json:"dhcpd_boot_filename,omitempty"` // .{1,256}
|
||||
DHCPDBootServer string `json:"dhcpd_boot_server"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|[a-zA-Z0-9-]{1,63}|^$
|
||||
DHCPDDNS1 string `json:"dhcpd_dns_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS2 string `json:"dhcpd_dns_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS3 string `json:"dhcpd_dns_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS4 string `json:"dhcpd_dns_4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNSEnabled bool `json:"dhcpd_dns_enabled"`
|
||||
DHCPDEnabled bool `json:"dhcpd_enabled"`
|
||||
DHCPDGateway string `json:"dhcpd_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDGatewayEnabled bool `json:"dhcpd_gateway_enabled"`
|
||||
DHCPDIP1 string `json:"dhcpd_ip_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDIP2 string `json:"dhcpd_ip_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDIP3 string `json:"dhcpd_ip_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDLeaseTime int `json:"dhcpd_leasetime,omitempty"`
|
||||
DHCPDMAC1 string `json:"dhcpd_mac_1"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDMAC2 string `json:"dhcpd_mac_2"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDMAC3 string `json:"dhcpd_mac_3"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDNtp1 string `json:"dhcpd_ntp_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDNtp2 string `json:"dhcpd_ntp_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDNtpEnabled bool `json:"dhcpd_ntp_enabled"`
|
||||
DHCPDStart string `json:"dhcpd_start"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDStop string `json:"dhcpd_stop"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDTFTPServer string `json:"dhcpd_tftp_server,omitempty"`
|
||||
DHCPDTimeOffset int `json:"dhcpd_time_offset,omitempty"` // ^0$|^-?([1-9]([0-9]{1,3})?|[1-7][0-9]{4}|[8][0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
||||
DHCPDTimeOffsetEnabled bool `json:"dhcpd_time_offset_enabled"`
|
||||
DHCPDUnifiController string `json:"dhcpd_unifi_controller"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDV6DNS1 string `json:"dhcpdv6_dns_1,omitempty"`
|
||||
DHCPDV6DNS2 string `json:"dhcpdv6_dns_2,omitempty"`
|
||||
DHCPDV6DNS3 string `json:"dhcpdv6_dns_3,omitempty"`
|
||||
DHCPDV6DNS4 string `json:"dhcpdv6_dns_4,omitempty"`
|
||||
DHCPDV6DNSAuto bool `json:"dhcpdv6_dns_auto"`
|
||||
DHCPDV6Enabled bool `json:"dhcpdv6_enabled"`
|
||||
DHCPDV6LeaseTime int `json:"dhcpdv6_leasetime,omitempty"`
|
||||
DHCPDV6Start string `json:"dhcpdv6_start,omitempty"`
|
||||
DHCPDV6Stop string `json:"dhcpdv6_stop,omitempty"`
|
||||
DHCPDWPAdUrl string `json:"dhcpd_wpad_url,omitempty"`
|
||||
DHCPDWins1 string `json:"dhcpd_wins_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDWins2 string `json:"dhcpd_wins_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDWinsEnabled bool `json:"dhcpd_wins_enabled"`
|
||||
DHCPRelayEnabled bool `json:"dhcp_relay_enabled"`
|
||||
DHCPguardEnabled bool `json:"dhcpguard_enabled"`
|
||||
DPIEnabled bool `json:"dpi_enabled"`
|
||||
DPIgroupID string `json:"dpigroup_id"` // [\d\w]+|^$
|
||||
DomainName string `json:"domain_name"` // (?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^$|[a-zA-Z0-9-]{1,63}
|
||||
Enabled bool `json:"enabled"`
|
||||
ExposedToSiteVPN bool `json:"exposed_to_site_vpn"`
|
||||
GatewayDevice string `json:"gateway_device"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
GatewayType string `json:"gateway_type,omitempty"` // default|switch
|
||||
IGMPFastleave bool `json:"igmp_fastleave"`
|
||||
IGMPGroupmembership int `json:"igmp_groupmembership,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-2][0-9]{3}|3[0-5][0-9]{2}|3600|^$
|
||||
IGMPMaxresponse int `json:"igmp_maxresponse,omitempty"` // [1-9]|1[0-9]|2[0-5]|^$
|
||||
IGMPMcrtrexpiretime int `json:"igmp_mcrtrexpiretime,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-2][0-9]{3}|3[0-5][0-9]{2}|3600|^$
|
||||
IGMPProxyDownstream bool `json:"igmp_proxy_downstream"`
|
||||
IGMPProxyUpstream bool `json:"igmp_proxy_upstream"`
|
||||
IGMPQuerier string `json:"igmp_querier"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
IGMPSnooping bool `json:"igmp_snooping"`
|
||||
IGMPSupression bool `json:"igmp_supression"`
|
||||
IPSecDhGroup int `json:"ipsec_dh_group,omitempty"` // 2|5|14|15|16|19|20|21|25|26
|
||||
IPSecDynamicRouting bool `json:"ipsec_dynamic_routing"`
|
||||
IPSecEncryption string `json:"ipsec_encryption,omitempty"` // aes128|aes192|aes256|3des
|
||||
IPSecEspDhGroup int `json:"ipsec_esp_dh_group,omitempty"` // 1|2|5|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32
|
||||
IPSecHash string `json:"ipsec_hash,omitempty"` // sha1|md5|sha256|sha384|sha512
|
||||
IPSecIkeDhGroup int `json:"ipsec_ike_dh_group,omitempty"` // 1|2|5|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32
|
||||
IPSecInterface string `json:"ipsec_interface,omitempty"` // wan|wan2
|
||||
IPSecKeyExchange string `json:"ipsec_key_exchange,omitempty"` // ikev1|ikev2
|
||||
IPSecLocalIP string `json:"ipsec_local_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
IPSecPeerIP string `json:"ipsec_peer_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
IPSecPfs bool `json:"ipsec_pfs"`
|
||||
IPSecProfile string `json:"ipsec_profile,omitempty"` // customized|azure_dynamic|azure_static
|
||||
IPSubnet string `json:"ip_subnet,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||
IPV6InterfaceType string `json:"ipv6_interface_type,omitempty"` // static|pd|none
|
||||
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty"` // wan|wan2
|
||||
IPV6PDPrefixid string `json:"ipv6_pd_prefixid"` // ^$|[a-fA-F0-9]{1,4}
|
||||
IPV6PDStart string `json:"ipv6_pd_start,omitempty"`
|
||||
IPV6PDStop string `json:"ipv6_pd_stop,omitempty"`
|
||||
IPV6RaEnabled bool `json:"ipv6_ra_enabled"`
|
||||
IPV6RaPreferredLifetime int `json:"ipv6_ra_preferred_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
||||
IPV6RaPriority string `json:"ipv6_ra_priority,omitempty"` // high|medium|low
|
||||
IPV6RaValidLifetime int `json:"ipv6_ra_valid_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
||||
IPV6Subnet string `json:"ipv6_subnet,omitempty"`
|
||||
InternetAccessEnabled bool `json:"internet_access_enabled"`
|
||||
IsNAT bool `json:"is_nat"`
|
||||
L2TpAllowWeakCiphers bool `json:"l2tp_allow_weak_ciphers"`
|
||||
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan|wan2
|
||||
L2TpLocalWANIP string `json:"l2tp_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
LocalPort int `json:"local_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
LteLanEnabled bool `json:"lte_lan_enabled"`
|
||||
MACOverride string `json:"mac_override"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
MACOverrideEnabled bool `json:"mac_override_enabled"`
|
||||
MdnsEnabled bool `json:"mdns_enabled"`
|
||||
NATOutboundIPAddresses []NetworkNATOutboundIPAddresses `json:"nat_outbound_ip_addresses,omitempty"`
|
||||
Name string `json:"name,omitempty"` // .{1,128}
|
||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?
|
||||
NetworkIsolationEnabled bool `json:"network_isolation_enabled"`
|
||||
OpenVPNConfiguration string `json:"openvpn_configuration,omitempty"`
|
||||
OpenVPNConfigurationFilename string `json:"openvpn_configuration_filename,omitempty"`
|
||||
OpenVPNInterface string `json:"openvpn_interface,omitempty"` // wan|wan2
|
||||
OpenVPNLocalAddress string `json:"openvpn_local_address,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNLocalPort int `json:"openvpn_local_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
OpenVPNLocalWANIP string `json:"openvpn_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNMode string `json:"openvpn_mode,omitempty"` // site-to-site|client|server
|
||||
OpenVPNRemoteAddress string `json:"openvpn_remote_address,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNRemoteHost string `json:"openvpn_remote_host,omitempty"` // [^\"\' ]+|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNRemotePort int `json:"openvpn_remote_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
OpenVPNUsername string `json:"openvpn_username,omitempty"`
|
||||
PptpcRequireMppe bool `json:"pptpc_require_mppe"`
|
||||
PptpcRouteDistance int `json:"pptpc_route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||
PptpcServerIP string `json:"pptpc_server_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^[a-zA-Z0-9-]{1,63}$
|
||||
PptpcUsername string `json:"pptpc_username,omitempty"` // [^\"\' ]+
|
||||
Priority int `json:"priority,omitempty"` // [1-4]
|
||||
Purpose string `json:"purpose,omitempty"` // corporate|guest|remote-user-vpn|site-vpn|vlan-only|vpn-client|wan
|
||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||
RemoteSiteID string `json:"remote_site_id"`
|
||||
RemoteSiteSubnets []string `json:"remote_site_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
||||
RemoteVPNSubnets []string `json:"remote_vpn_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
||||
ReportWANEvent bool `json:"report_wan_event"`
|
||||
RequireMschapv2 bool `json:"require_mschapv2"`
|
||||
RouteDistance int `json:"route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
UpnpLanEnabled bool `json:"upnp_lan_enabled"`
|
||||
UserGroupID string `json:"usergroup_id"`
|
||||
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|400[0-9]|^$
|
||||
VLANEnabled bool `json:"vlan_enabled"`
|
||||
VPNClientDefaultRoute bool `json:"vpn_client_default_route"`
|
||||
VPNClientPullDNS bool `json:"vpn_client_pull_dns"`
|
||||
VPNProtocol string `json:"vpn_protocol,omitempty"` // tcp|udp
|
||||
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-client|openvpn-server|openvpn-vpn|pptp-client|l2tp-server|pptp-server|uid-server|wireguard-server
|
||||
VrrpIPSubnetGw1 string `json:"vrrp_ip_subnet_gw1,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||
VrrpIPSubnetGw2 string `json:"vrrp_ip_subnet_gw2,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||
VrrpVrid int `json:"vrrp_vrid,omitempty"` // [1-9]|[1-9][0-9]
|
||||
WANDHCPCos int `json:"wan_dhcp_cos,omitempty"` // [0-7]|^$
|
||||
WANDHCPOptions []NetworkWANDHCPOptions `json:"wan_dhcp_options,omitempty"`
|
||||
WANDHCPv6PDSize int `json:"wan_dhcpv6_pd_size,omitempty"` // ^(4[89]|5[0-9]|6[0-4])$|^$
|
||||
WANDNS1 string `json:"wan_dns1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS2 string `json:"wan_dns2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS3 string `json:"wan_dns3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS4 string `json:"wan_dns4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNSPreference string `json:"wan_dns_preference,omitempty"` // auto|manual
|
||||
WANEgressQOS int `json:"wan_egress_qos,omitempty"` // [1-7]|^$
|
||||
WANGateway string `json:"wan_gateway,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WANGatewayV6 string `json:"wan_gateway_v6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANIP string `json:"wan_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WANIPAliases []string `json:"wan_ip_aliases,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([8-9]|[1-2][0-9]|3[0-2])$|^$
|
||||
WANIPV6 string `json:"wan_ipv6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANLoadBalanceType string `json:"wan_load_balance_type,omitempty"` // failover-only|weighted
|
||||
WANLoadBalanceWeight int `json:"wan_load_balance_weight,omitempty"` // [1-9]|[1-9][0-9]
|
||||
WANNetmask string `json:"wan_netmask,omitempty"` // ^((128|192|224|240|248|252|254)\.0\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0)|255\.(0|128|192|224|240|248|252|254)))))$
|
||||
WANNetworkGroup string `json:"wan_networkgroup,omitempty"` // WAN[2]?|WAN_LTE_FAILOVER
|
||||
WANPrefixlen int `json:"wan_prefixlen,omitempty"` // ^([1-9]|[1-8][0-9]|9[0-9]|1[01][0-9]|12[0-8])$|^$
|
||||
WANProviderCapabilities NetworkWANProviderCapabilities `json:"wan_provider_capabilities,omitempty"`
|
||||
WANSmartqDownRate int `json:"wan_smartq_down_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||
WANSmartqEnabled bool `json:"wan_smartq_enabled"`
|
||||
WANSmartqUpRate int `json:"wan_smartq_up_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||
WANType string `json:"wan_type,omitempty"` // disabled|dhcp|static|pppoe
|
||||
WANTypeV6 string `json:"wan_type_v6,omitempty"` // disabled|dhcpv6|static
|
||||
WANUsername string `json:"wan_username,omitempty"` // [^"' ]+
|
||||
WANVLAN int `json:"wan_vlan,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-4]|^$
|
||||
WANVLANEnabled bool `json:"wan_vlan_enabled"`
|
||||
WireguardInterface string `json:"wireguard_interface,omitempty"` // wan|wan2
|
||||
WireguardLocalWANIP string `json:"wireguard_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WireguardPublicKey string `json:"wireguard_public_key,omitempty"`
|
||||
XAuthKey string `json:"x_auth_key,omitempty"`
|
||||
XCaCrt string `json:"x_ca_crt,omitempty"`
|
||||
XCaKey string `json:"x_ca_key,omitempty"`
|
||||
XDhKey string `json:"x_dh_key,omitempty"`
|
||||
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
||||
XOpenVPNPassword string `json:"x_openvpn_password,omitempty"`
|
||||
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
||||
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
||||
XServerCrt string `json:"x_server_crt,omitempty"`
|
||||
XServerKey string `json:"x_server_key,omitempty"`
|
||||
XSharedClientCrt string `json:"x_shared_client_crt,omitempty"`
|
||||
XSharedClientKey string `json:"x_shared_client_key,omitempty"`
|
||||
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
|
||||
XWireguardPrivateKey string `json:"x_wireguard_private_key,omitempty"`
|
||||
AutoScaleEnabled bool `json:"auto_scale_enabled"`
|
||||
DHCPDBootEnabled bool `json:"dhcpd_boot_enabled"`
|
||||
DHCPDBootFilename string `json:"dhcpd_boot_filename,omitempty"` // .{1,256}
|
||||
DHCPDBootServer string `json:"dhcpd_boot_server"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|[a-zA-Z0-9-]{1,63}|^$
|
||||
DHCPDConflictChecking bool `json:"dhcpd_conflict_checking"`
|
||||
DHCPDDNS1 string `json:"dhcpd_dns_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS2 string `json:"dhcpd_dns_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS3 string `json:"dhcpd_dns_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNS4 string `json:"dhcpd_dns_4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDDNSEnabled bool `json:"dhcpd_dns_enabled"`
|
||||
DHCPDEnabled bool `json:"dhcpd_enabled"`
|
||||
DHCPDGateway string `json:"dhcpd_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDGatewayEnabled bool `json:"dhcpd_gateway_enabled"`
|
||||
DHCPDIP1 string `json:"dhcpd_ip_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDIP2 string `json:"dhcpd_ip_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDIP3 string `json:"dhcpd_ip_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDLeaseTime int `json:"dhcpd_leasetime,omitempty"`
|
||||
DHCPDMAC1 string `json:"dhcpd_mac_1"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDMAC2 string `json:"dhcpd_mac_2"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDMAC3 string `json:"dhcpd_mac_3"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
DHCPDNtp1 string `json:"dhcpd_ntp_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDNtp2 string `json:"dhcpd_ntp_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDNtpEnabled bool `json:"dhcpd_ntp_enabled"`
|
||||
DHCPDStart string `json:"dhcpd_start"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDStop string `json:"dhcpd_stop"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDTFTPServer string `json:"dhcpd_tftp_server,omitempty"`
|
||||
DHCPDTimeOffset int `json:"dhcpd_time_offset,omitempty"` // ^0$|^-?([1-9]([0-9]{1,3})?|[1-7][0-9]{4}|[8][0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
||||
DHCPDTimeOffsetEnabled bool `json:"dhcpd_time_offset_enabled"`
|
||||
DHCPDUnifiController string `json:"dhcpd_unifi_controller"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDV6AllowSlaac bool `json:"dhcpdv6_allow_slaac"`
|
||||
DHCPDV6DNS1 string `json:"dhcpdv6_dns_1,omitempty"`
|
||||
DHCPDV6DNS2 string `json:"dhcpdv6_dns_2,omitempty"`
|
||||
DHCPDV6DNS3 string `json:"dhcpdv6_dns_3,omitempty"`
|
||||
DHCPDV6DNS4 string `json:"dhcpdv6_dns_4,omitempty"`
|
||||
DHCPDV6DNSAuto bool `json:"dhcpdv6_dns_auto"`
|
||||
DHCPDV6Enabled bool `json:"dhcpdv6_enabled"`
|
||||
DHCPDV6LeaseTime int `json:"dhcpdv6_leasetime,omitempty"`
|
||||
DHCPDV6Start string `json:"dhcpdv6_start,omitempty"`
|
||||
DHCPDV6Stop string `json:"dhcpdv6_stop,omitempty"`
|
||||
DHCPDWPAdUrl string `json:"dhcpd_wpad_url,omitempty"`
|
||||
DHCPDWins1 string `json:"dhcpd_wins_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDWins2 string `json:"dhcpd_wins_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
DHCPDWinsEnabled bool `json:"dhcpd_wins_enabled"`
|
||||
DHCPRelayEnabled bool `json:"dhcp_relay_enabled"`
|
||||
DHCPguardEnabled bool `json:"dhcpguard_enabled"`
|
||||
DPIEnabled bool `json:"dpi_enabled"`
|
||||
DPIgroupID string `json:"dpigroup_id"` // [\d\w]+|^$
|
||||
DomainName string `json:"domain_name"` // (?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^$|[a-zA-Z0-9-]{1,63}
|
||||
Enabled bool `json:"enabled"`
|
||||
ExposedToSiteVPN bool `json:"exposed_to_site_vpn"`
|
||||
GatewayDevice string `json:"gateway_device"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
GatewayType string `json:"gateway_type,omitempty"` // default|switch
|
||||
IGMPFastleave bool `json:"igmp_fastleave"`
|
||||
IGMPGroupmembership int `json:"igmp_groupmembership,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-2][0-9]{3}|3[0-5][0-9]{2}|3600|^$
|
||||
IGMPMaxresponse int `json:"igmp_maxresponse,omitempty"` // [1-9]|1[0-9]|2[0-5]|^$
|
||||
IGMPMcrtrexpiretime int `json:"igmp_mcrtrexpiretime,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-2][0-9]{3}|3[0-5][0-9]{2}|3600|^$
|
||||
IGMPProxyDownstream bool `json:"igmp_proxy_downstream"`
|
||||
IGMPProxyUpstream bool `json:"igmp_proxy_upstream"`
|
||||
IGMPQuerier string `json:"igmp_querier"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
IGMPSnooping bool `json:"igmp_snooping"`
|
||||
IGMPSupression bool `json:"igmp_supression"`
|
||||
IPSecDhGroup int `json:"ipsec_dh_group,omitempty"` // 2|5|14|15|16|19|20|21|25|26
|
||||
IPSecDynamicRouting bool `json:"ipsec_dynamic_routing"`
|
||||
IPSecEncryption string `json:"ipsec_encryption,omitempty"` // aes128|aes192|aes256|3des
|
||||
IPSecEspDhGroup int `json:"ipsec_esp_dh_group,omitempty"` // 1|2|5|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32
|
||||
IPSecEspEncryption string `json:"ipsec_esp_encryption,omitempty"` // aes128|aes192|aes256|3des
|
||||
IPSecEspHash string `json:"ipsec_esp_hash,omitempty"` // sha1|md5|sha256|sha384|sha512
|
||||
IPSecEspLifetime string `json:"ipsec_esp_lifetime,omitempty"` // ^(?:3[0-9]|[4-9][0-9]|[1-9][0-9]{2,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
||||
IPSecHash string `json:"ipsec_hash,omitempty"` // sha1|md5|sha256|sha384|sha512
|
||||
IPSecIkeDhGroup int `json:"ipsec_ike_dh_group,omitempty"` // 1|2|5|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32
|
||||
IPSecIkeEncryption string `json:"ipsec_ike_encryption,omitempty"` // aes128|aes192|aes256|3des
|
||||
IPSecIkeHash string `json:"ipsec_ike_hash,omitempty"` // sha1|md5|sha256|sha384|sha512
|
||||
IPSecIkeLifetime string `json:"ipsec_ike_lifetime,omitempty"` // ^(?:3[0-9]|[4-9][0-9]|[1-9][0-9]{2,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
||||
IPSecInterface string `json:"ipsec_interface,omitempty"` // wan|wan2
|
||||
IPSecKeyExchange string `json:"ipsec_key_exchange,omitempty"` // ikev1|ikev2
|
||||
IPSecLocalIDentifier string `json:"ipsec_local_identifier,omitempty"`
|
||||
IPSecLocalIDentifierEnabled bool `json:"ipsec_local_identifier_enabled"`
|
||||
IPSecLocalIP string `json:"ipsec_local_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
IPSecPeerIP string `json:"ipsec_peer_ip,omitempty"`
|
||||
IPSecPfs bool `json:"ipsec_pfs"`
|
||||
IPSecProfile string `json:"ipsec_profile,omitempty"` // customized|azure_dynamic|azure_static
|
||||
IPSecRemoteIDentifier string `json:"ipsec_remote_identifier,omitempty"`
|
||||
IPSecRemoteIDentifierEnabled bool `json:"ipsec_remote_identifier_enabled"`
|
||||
IPSecSeparateIkev2Networks bool `json:"ipsec_separate_ikev2_networks"`
|
||||
IPSecTunnelIP string `json:"ipsec_tunnel_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|3[0-2])$
|
||||
IPSecTunnelIPEnabled bool `json:"ipsec_tunnel_ip_enabled"`
|
||||
IPSubnet string `json:"ip_subnet,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|3[0-2])$
|
||||
IPV6ClientAddressAssignment string `json:"ipv6_client_address_assignment,omitempty"` // slaac|dhcpv6
|
||||
IPV6InterfaceType string `json:"ipv6_interface_type,omitempty"` // static|pd|single_network|none
|
||||
IPV6PDAutoPrefixidEnabled bool `json:"ipv6_pd_auto_prefixid_enabled"`
|
||||
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty"` // wan|wan2
|
||||
IPV6PDPrefixid string `json:"ipv6_pd_prefixid"` // ^$|[a-fA-F0-9]{1,4}
|
||||
IPV6PDStart string `json:"ipv6_pd_start,omitempty"`
|
||||
IPV6PDStop string `json:"ipv6_pd_stop,omitempty"`
|
||||
IPV6RaEnabled bool `json:"ipv6_ra_enabled"`
|
||||
IPV6RaPreferredLifetime int `json:"ipv6_ra_preferred_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
||||
IPV6RaPriority string `json:"ipv6_ra_priority,omitempty"` // high|medium|low
|
||||
IPV6RaValidLifetime int `json:"ipv6_ra_valid_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
||||
IPV6SettingPreference string `json:"ipv6_setting_preference,omitempty"` // auto|manual
|
||||
IPV6SingleNetworkInterface string `json:"ipv6_single_network_interface,omitempty"`
|
||||
IPV6Subnet string `json:"ipv6_subnet,omitempty"`
|
||||
IPV6WANDelegationType string `json:"ipv6_wan_delegation_type,omitempty"` // pd|single_network|none
|
||||
InterfaceMtu int `json:"interface_mtu,omitempty"` // ^(6[89]|[7-9][0-9]|[1-9][0-9]{2,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|65500)$
|
||||
InterfaceMtuEnabled bool `json:"interface_mtu_enabled"`
|
||||
InternetAccessEnabled bool `json:"internet_access_enabled"`
|
||||
IsNAT bool `json:"is_nat"`
|
||||
L2TpAllowWeakCiphers bool `json:"l2tp_allow_weak_ciphers"`
|
||||
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan|wan2
|
||||
L2TpLocalWANIP string `json:"l2tp_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
LocalPort int `json:"local_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
LteLanEnabled bool `json:"lte_lan_enabled"`
|
||||
MACOverride string `json:"mac_override"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
MACOverrideEnabled bool `json:"mac_override_enabled"`
|
||||
MdnsEnabled bool `json:"mdns_enabled"`
|
||||
NATOutboundIPAddresses []NetworkNATOutboundIPAddresses `json:"nat_outbound_ip_addresses,omitempty"`
|
||||
Name string `json:"name,omitempty"` // .{1,128}
|
||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?
|
||||
NetworkIsolationEnabled bool `json:"network_isolation_enabled"`
|
||||
OpenVPNConfiguration string `json:"openvpn_configuration,omitempty"`
|
||||
OpenVPNConfigurationFilename string `json:"openvpn_configuration_filename,omitempty"`
|
||||
OpenVPNEncryptionCipher string `json:"openvpn_encryption_cipher,omitempty"` // AES_256_GCM|AES_256_CBC|BF_CBC
|
||||
OpenVPNInterface string `json:"openvpn_interface,omitempty"` // wan|wan2
|
||||
OpenVPNLocalAddress string `json:"openvpn_local_address,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNLocalPort int `json:"openvpn_local_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
OpenVPNLocalWANIP string `json:"openvpn_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNMode string `json:"openvpn_mode,omitempty"` // site-to-site|client|server
|
||||
OpenVPNRemoteAddress string `json:"openvpn_remote_address,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNRemoteHost string `json:"openvpn_remote_host,omitempty"` // [^\"\' ]+|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
OpenVPNRemotePort int `json:"openvpn_remote_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
OpenVPNUsername string `json:"openvpn_username,omitempty"`
|
||||
PptpcRequireMppe bool `json:"pptpc_require_mppe"`
|
||||
PptpcRouteDistance int `json:"pptpc_route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||
PptpcServerIP string `json:"pptpc_server_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^[a-zA-Z0-9-]{1,63}$
|
||||
PptpcUsername string `json:"pptpc_username,omitempty"` // [^\"\' ]+
|
||||
Priority int `json:"priority,omitempty"` // [1-4]
|
||||
Purpose string `json:"purpose,omitempty"` // corporate|guest|remote-user-vpn|site-vpn|vlan-only|vpn-client|wan
|
||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||
RemoteSiteID string `json:"remote_site_id"`
|
||||
RemoteSiteSubnets []string `json:"remote_site_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
||||
RemoteVPNDynamicSubnetsEnabled bool `json:"remote_vpn_dynamic_subnets_enabled"`
|
||||
RemoteVPNSubnets []string `json:"remote_vpn_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|3[0-2])$|^$
|
||||
ReportWANEvent bool `json:"report_wan_event"`
|
||||
RequireMschapv2 bool `json:"require_mschapv2"`
|
||||
RouteDistance int `json:"route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
SingleNetworkLan string `json:"single_network_lan,omitempty"`
|
||||
UidPolicyEnabled bool `json:"uid_policy_enabled"`
|
||||
UidPolicyName string `json:"uid_policy_name,omitempty"`
|
||||
UidPublicGatewayPort int `json:"uid_public_gateway_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
UidTrafficRulesAllowedIPsAndHostnames []string `json:"uid_traffic_rules_allowed_ips_and_hostnames,omitempty"`
|
||||
UidTrafficRulesEnabled bool `json:"uid_traffic_rules_enabled"`
|
||||
UidVPNCustomRouting []string `json:"uid_vpn_custom_routing,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|3[0-2])$
|
||||
UidVPNDefaultDNSSuffix string `json:"uid_vpn_default_dns_suffix,omitempty"`
|
||||
UidVPNMasqueradeEnabled bool `json:"uid_vpn_masquerade_enabled"`
|
||||
UidVPNMaxConnectionTimeSeconds int `json:"uid_vpn_max_connection_time_seconds,omitempty"` // ^[1-9][0-9]*$
|
||||
UidVPNSyncPublicIP bool `json:"uid_vpn_sync_public_ip"`
|
||||
UidVPNType string `json:"uid_vpn_type,omitempty"` // openvpn|wireguard
|
||||
UidWorkspaceUrl string `json:"uid_workspace_url,omitempty"`
|
||||
UpnpLanEnabled bool `json:"upnp_lan_enabled"`
|
||||
UserGroupID string `json:"usergroup_id"`
|
||||
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|400[0-9]|401[0-8]|^$
|
||||
VLANEnabled bool `json:"vlan_enabled"`
|
||||
VPNClientConfigurationRemoteIPOverride string `json:"vpn_client_configuration_remote_ip_override,omitempty"`
|
||||
VPNClientConfigurationRemoteIPOverrideEnabled bool `json:"vpn_client_configuration_remote_ip_override_enabled"`
|
||||
VPNClientDefaultRoute bool `json:"vpn_client_default_route"`
|
||||
VPNClientPullDNS bool `json:"vpn_client_pull_dns"`
|
||||
VPNProtocol string `json:"vpn_protocol,omitempty"` // TCP|UDP
|
||||
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-client|openvpn-server|openvpn-vpn|pptp-client|l2tp-server|pptp-server|uid-server|wireguard-server|wireguard-client
|
||||
VrrpIPSubnetGw1 string `json:"vrrp_ip_subnet_gw1,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||
VrrpIPSubnetGw2 string `json:"vrrp_ip_subnet_gw2,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||
VrrpVrid int `json:"vrrp_vrid,omitempty"` // [1-9]|[1-9][0-9]
|
||||
WANDHCPCos int `json:"wan_dhcp_cos,omitempty"` // [0-7]|^$
|
||||
WANDHCPOptions []NetworkWANDHCPOptions `json:"wan_dhcp_options,omitempty"`
|
||||
WANDHCPv6PDSize int `json:"wan_dhcpv6_pd_size,omitempty"` // ^(4[89]|5[0-9]|6[0-4])$|^$
|
||||
WANDNS1 string `json:"wan_dns1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS2 string `json:"wan_dns2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS3 string `json:"wan_dns3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNS4 string `json:"wan_dns4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANDNSPreference string `json:"wan_dns_preference,omitempty"` // auto|manual
|
||||
WANDsliteRemoteHost string `json:"wan_dslite_remote_host,omitempty"`
|
||||
WANEgressQOS int `json:"wan_egress_qos,omitempty"` // [1-7]|^$
|
||||
WANGateway string `json:"wan_gateway,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WANGatewayV6 string `json:"wan_gateway_v6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANIP string `json:"wan_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WANIPAliases []string `json:"wan_ip_aliases,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([8-9]|[1-2][0-9]|3[0-2])$|^$
|
||||
WANIPV6 string `json:"wan_ipv6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANIPV6DNS1 string `json:"wan_ipv6_dns1"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANIPV6DNS2 string `json:"wan_ipv6_dns2"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||
WANIPV6DNSPreference string `json:"wan_ipv6_dns_preference,omitempty"` // auto|manual
|
||||
WANLoadBalanceType string `json:"wan_load_balance_type,omitempty"` // failover-only|weighted
|
||||
WANLoadBalanceWeight int `json:"wan_load_balance_weight,omitempty"` // ^$|[1-9]|[1-9][0-9]
|
||||
WANNetmask string `json:"wan_netmask,omitempty"` // ^((128|192|224|240|248|252|254)\.0\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0\.0)|(255\.(((0|128|192|224|240|248|252|254)\.0)|255\.(0|128|192|224|240|248|252|254)))))$
|
||||
WANNetworkGroup string `json:"wan_networkgroup,omitempty"` // WAN[2]?|WAN_LTE_FAILOVER
|
||||
WANPppoePasswordEnabled bool `json:"wan_pppoe_password_enabled"`
|
||||
WANPppoeUsernameEnabled bool `json:"wan_pppoe_username_enabled"`
|
||||
WANPrefixlen int `json:"wan_prefixlen,omitempty"` // ^([1-9]|[1-8][0-9]|9[0-9]|1[01][0-9]|12[0-8])$|^$
|
||||
WANProviderCapabilities NetworkWANProviderCapabilities `json:"wan_provider_capabilities,omitempty"`
|
||||
WANSmartqDownRate int `json:"wan_smartq_down_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||
WANSmartqEnabled bool `json:"wan_smartq_enabled"`
|
||||
WANSmartqUpRate int `json:"wan_smartq_up_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||
WANType string `json:"wan_type,omitempty"` // disabled|dhcp|static|pppoe|dslite
|
||||
WANTypeV6 string `json:"wan_type_v6,omitempty"` // disabled|slaac|dhcpv6|static
|
||||
WANUsername string `json:"wan_username"` // [^"' ]+|^$
|
||||
WANVLAN int `json:"wan_vlan,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-4]|^$
|
||||
WANVLANEnabled bool `json:"wan_vlan_enabled"`
|
||||
WireguardClientConfigurationFile string `json:"wireguard_client_configuration_file,omitempty"`
|
||||
WireguardClientConfigurationFilename string `json:"wireguard_client_configuration_filename,omitempty"`
|
||||
WireguardClientMode string `json:"wireguard_client_mode,omitempty"` // file|manual
|
||||
WireguardClientPeerIP string `json:"wireguard_client_peer_ip,omitempty"`
|
||||
WireguardClientPeerPort int `json:"wireguard_client_peer_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||
WireguardClientPeerPublicKey string `json:"wireguard_client_peer_public_key,omitempty"`
|
||||
WireguardClientPresharedKey string `json:"wireguard_client_preshared_key,omitempty"`
|
||||
WireguardClientPresharedKeyEnabled bool `json:"wireguard_client_preshared_key_enabled"`
|
||||
WireguardInterface string `json:"wireguard_interface,omitempty"` // wan|wan2
|
||||
WireguardLocalWANIP string `json:"wireguard_local_wan_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
WireguardPublicKey string `json:"wireguard_public_key,omitempty"`
|
||||
XAuthKey string `json:"x_auth_key,omitempty"`
|
||||
XCaCrt string `json:"x_ca_crt,omitempty"`
|
||||
XCaKey string `json:"x_ca_key,omitempty"`
|
||||
XDhKey string `json:"x_dh_key,omitempty"`
|
||||
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
||||
XOpenVPNPassword string `json:"x_openvpn_password,omitempty"`
|
||||
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
||||
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
||||
XServerCrt string `json:"x_server_crt,omitempty"`
|
||||
XServerKey string `json:"x_server_key,omitempty"`
|
||||
XSharedClientCrt string `json:"x_shared_client_crt,omitempty"`
|
||||
XSharedClientKey string `json:"x_shared_client_key,omitempty"`
|
||||
XWANPassword string `json:"x_wan_password"` // [^"' ]+|^$
|
||||
XWireguardPrivateKey string `json:"x_wireguard_private_key,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
type Alias Network
|
||||
aux := &struct {
|
||||
DHCPDLeaseTime emptyStringInt `json:"dhcpd_leasetime"`
|
||||
DHCPDTimeOffset emptyStringInt `json:"dhcpd_time_offset"`
|
||||
DHCPDV6LeaseTime emptyStringInt `json:"dhcpdv6_leasetime"`
|
||||
IGMPGroupmembership emptyStringInt `json:"igmp_groupmembership"`
|
||||
IGMPMaxresponse emptyStringInt `json:"igmp_maxresponse"`
|
||||
IGMPMcrtrexpiretime emptyStringInt `json:"igmp_mcrtrexpiretime"`
|
||||
IPSecDhGroup emptyStringInt `json:"ipsec_dh_group"`
|
||||
IPSecEspDhGroup emptyStringInt `json:"ipsec_esp_dh_group"`
|
||||
IPSecIkeDhGroup emptyStringInt `json:"ipsec_ike_dh_group"`
|
||||
IPV6RaPreferredLifetime emptyStringInt `json:"ipv6_ra_preferred_lifetime"`
|
||||
IPV6RaValidLifetime emptyStringInt `json:"ipv6_ra_valid_lifetime"`
|
||||
InternetAccessEnabled *bool `json:"internet_access_enabled"`
|
||||
LocalPort emptyStringInt `json:"local_port"`
|
||||
OpenVPNLocalPort emptyStringInt `json:"openvpn_local_port"`
|
||||
OpenVPNRemotePort emptyStringInt `json:"openvpn_remote_port"`
|
||||
PptpcRouteDistance emptyStringInt `json:"pptpc_route_distance"`
|
||||
Priority emptyStringInt `json:"priority"`
|
||||
RouteDistance emptyStringInt `json:"route_distance"`
|
||||
VLAN emptyStringInt `json:"vlan"`
|
||||
VrrpVrid emptyStringInt `json:"vrrp_vrid"`
|
||||
WANDHCPCos emptyStringInt `json:"wan_dhcp_cos"`
|
||||
WANDHCPv6PDSize emptyStringInt `json:"wan_dhcpv6_pd_size"`
|
||||
WANEgressQOS emptyStringInt `json:"wan_egress_qos"`
|
||||
WANLoadBalanceWeight emptyStringInt `json:"wan_load_balance_weight"`
|
||||
WANPrefixlen emptyStringInt `json:"wan_prefixlen"`
|
||||
WANSmartqDownRate emptyStringInt `json:"wan_smartq_down_rate"`
|
||||
WANSmartqUpRate emptyStringInt `json:"wan_smartq_up_rate"`
|
||||
WANVLAN emptyStringInt `json:"wan_vlan"`
|
||||
DHCPDLeaseTime emptyStringInt `json:"dhcpd_leasetime"`
|
||||
DHCPDTimeOffset emptyStringInt `json:"dhcpd_time_offset"`
|
||||
DHCPDV6LeaseTime emptyStringInt `json:"dhcpdv6_leasetime"`
|
||||
IGMPGroupmembership emptyStringInt `json:"igmp_groupmembership"`
|
||||
IGMPMaxresponse emptyStringInt `json:"igmp_maxresponse"`
|
||||
IGMPMcrtrexpiretime emptyStringInt `json:"igmp_mcrtrexpiretime"`
|
||||
IPSecDhGroup emptyStringInt `json:"ipsec_dh_group"`
|
||||
IPSecEspDhGroup emptyStringInt `json:"ipsec_esp_dh_group"`
|
||||
IPSecIkeDhGroup emptyStringInt `json:"ipsec_ike_dh_group"`
|
||||
IPV6RaPreferredLifetime emptyStringInt `json:"ipv6_ra_preferred_lifetime"`
|
||||
IPV6RaValidLifetime emptyStringInt `json:"ipv6_ra_valid_lifetime"`
|
||||
InterfaceMtu emptyStringInt `json:"interface_mtu"`
|
||||
InternetAccessEnabled *bool `json:"internet_access_enabled"`
|
||||
LocalPort emptyStringInt `json:"local_port"`
|
||||
OpenVPNLocalPort emptyStringInt `json:"openvpn_local_port"`
|
||||
OpenVPNRemotePort emptyStringInt `json:"openvpn_remote_port"`
|
||||
PptpcRouteDistance emptyStringInt `json:"pptpc_route_distance"`
|
||||
Priority emptyStringInt `json:"priority"`
|
||||
RouteDistance emptyStringInt `json:"route_distance"`
|
||||
UidPublicGatewayPort emptyStringInt `json:"uid_public_gateway_port"`
|
||||
UidVPNMaxConnectionTimeSeconds emptyStringInt `json:"uid_vpn_max_connection_time_seconds"`
|
||||
VLAN emptyStringInt `json:"vlan"`
|
||||
VrrpVrid emptyStringInt `json:"vrrp_vrid"`
|
||||
WANDHCPCos emptyStringInt `json:"wan_dhcp_cos"`
|
||||
WANDHCPv6PDSize emptyStringInt `json:"wan_dhcpv6_pd_size"`
|
||||
WANEgressQOS emptyStringInt `json:"wan_egress_qos"`
|
||||
WANLoadBalanceWeight emptyStringInt `json:"wan_load_balance_weight"`
|
||||
WANPrefixlen emptyStringInt `json:"wan_prefixlen"`
|
||||
WANSmartqDownRate emptyStringInt `json:"wan_smartq_down_rate"`
|
||||
WANSmartqUpRate emptyStringInt `json:"wan_smartq_up_rate"`
|
||||
WANVLAN emptyStringInt `json:"wan_vlan"`
|
||||
WireguardClientPeerPort emptyStringInt `json:"wireguard_client_peer_port"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
@@ -256,6 +313,7 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
dst.IPSecIkeDhGroup = int(aux.IPSecIkeDhGroup)
|
||||
dst.IPV6RaPreferredLifetime = int(aux.IPV6RaPreferredLifetime)
|
||||
dst.IPV6RaValidLifetime = int(aux.IPV6RaValidLifetime)
|
||||
dst.InterfaceMtu = int(aux.InterfaceMtu)
|
||||
dst.InternetAccessEnabled = emptyBoolToTrue(aux.InternetAccessEnabled)
|
||||
dst.LocalPort = int(aux.LocalPort)
|
||||
dst.OpenVPNLocalPort = int(aux.OpenVPNLocalPort)
|
||||
@@ -263,6 +321,8 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
dst.PptpcRouteDistance = int(aux.PptpcRouteDistance)
|
||||
dst.Priority = int(aux.Priority)
|
||||
dst.RouteDistance = int(aux.RouteDistance)
|
||||
dst.UidPublicGatewayPort = int(aux.UidPublicGatewayPort)
|
||||
dst.UidVPNMaxConnectionTimeSeconds = int(aux.UidVPNMaxConnectionTimeSeconds)
|
||||
dst.VLAN = int(aux.VLAN)
|
||||
dst.VrrpVrid = int(aux.VrrpVrid)
|
||||
dst.WANDHCPCos = int(aux.WANDHCPCos)
|
||||
@@ -273,13 +333,16 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
dst.WANSmartqDownRate = int(aux.WANSmartqDownRate)
|
||||
dst.WANSmartqUpRate = int(aux.WANSmartqUpRate)
|
||||
dst.WANVLAN = int(aux.WANVLAN)
|
||||
dst.WireguardClientPeerPort = int(aux.WireguardClientPeerPort)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type NetworkNATOutboundIPAddresses struct {
|
||||
IPAddress string `json:"ip_address"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
WANNetworkGroup string `json:"wan_network_group,omitempty"` // WAN|WAN2
|
||||
IPAddress string `json:"ip_address"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
IPAddressPool []string `json:"ip_address_pool,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])-(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||
Mode string `json:"mode,omitempty"` // all|ip_address|ip_address_pool
|
||||
WANNetworkGroup string `json:"wan_network_group,omitempty"` // WAN|WAN2
|
||||
}
|
||||
|
||||
func (dst *NetworkNATOutboundIPAddresses) UnmarshalJSON(b []byte) error {
|
||||
|
||||
185
unifi/port_profile.generated.go
generated
185
unifi/port_profile.generated.go
generated
@@ -25,42 +25,45 @@ type PortProfile struct {
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Autoneg bool `json:"autoneg"`
|
||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
||||
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
||||
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
|
||||
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled"`
|
||||
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||
FullDuplex bool `json:"full_duplex"`
|
||||
Isolation bool `json:"isolation"`
|
||||
LldpmedEnabled bool `json:"lldpmed_enabled"`
|
||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled"`
|
||||
NATiveNetworkID string `json:"native_networkconf_id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OpMode string `json:"op_mode,omitempty"` // switch
|
||||
PoeMode string `json:"poe_mode,omitempty"` // auto|off
|
||||
PortSecurityEnabled bool `json:"port_security_enabled"`
|
||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
ShowTrafficRestrictionAsAllowlist bool `json:"show_traffic_restriction_as_allowlist"`
|
||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled"`
|
||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlBroadcastastRate int `json:"stormctrl_bcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled"`
|
||||
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlMcastRate int `json:"stormctrl_mcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled"`
|
||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlUcastRate int `json:"stormctrl_ucast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StpPortMode bool `json:"stp_port_mode"`
|
||||
VoiceNetworkID string `json:"voice_networkconf_id"`
|
||||
Autoneg bool `json:"autoneg"`
|
||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
||||
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
|
||||
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
|
||||
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled"`
|
||||
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||
FecMode string `json:"fec_mode,omitempty"` // rs-fec|fc-fec|default|disabled
|
||||
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||
FullDuplex bool `json:"full_duplex"`
|
||||
Isolation bool `json:"isolation"`
|
||||
LldpmedEnabled bool `json:"lldpmed_enabled"`
|
||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled"`
|
||||
NATiveNetworkID string `json:"native_networkconf_id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
OpMode string `json:"op_mode,omitempty"` // switch
|
||||
PoeMode string `json:"poe_mode,omitempty"` // auto|off
|
||||
PortKeepaliveEnabled bool `json:"port_keepalive_enabled"`
|
||||
PortSecurityEnabled bool `json:"port_security_enabled"`
|
||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
QOSProfile PortProfileQOSProfile `json:"qos_profile,omitempty"`
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled"`
|
||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlBroadcastastRate int `json:"stormctrl_bcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled"`
|
||||
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlMcastRate int `json:"stormctrl_mcast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled"`
|
||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||
StormctrlUcastRate int `json:"stormctrl_ucast_rate,omitempty"` // [0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000
|
||||
StpPortMode bool `json:"stp_port_mode"`
|
||||
TaggedVLANMgmt string `json:"tagged_vlan_mgmt,omitempty"` // auto|block_all|custom
|
||||
VoiceNetworkID string `json:"voice_networkconf_id"`
|
||||
}
|
||||
|
||||
func (dst *PortProfile) UnmarshalJSON(b []byte) error {
|
||||
@@ -106,6 +109,116 @@ func (dst *PortProfile) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type PortProfileQOSMarking struct {
|
||||
CosCode int `json:"cos_code,omitempty"` // [0-7]
|
||||
DscpCode int `json:"dscp_code,omitempty"` // 0|8|16|24|32|40|48|56|10|12|14|18|20|22|26|28|30|34|36|38|44|46
|
||||
IPPrecedenceCode int `json:"ip_precedence_code,omitempty"` // [0-7]
|
||||
Queue int `json:"queue,omitempty"` // [0-7]
|
||||
}
|
||||
|
||||
func (dst *PortProfileQOSMarking) UnmarshalJSON(b []byte) error {
|
||||
type Alias PortProfileQOSMarking
|
||||
aux := &struct {
|
||||
CosCode emptyStringInt `json:"cos_code"`
|
||||
DscpCode emptyStringInt `json:"dscp_code"`
|
||||
IPPrecedenceCode emptyStringInt `json:"ip_precedence_code"`
|
||||
Queue emptyStringInt `json:"queue"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.CosCode = int(aux.CosCode)
|
||||
dst.DscpCode = int(aux.DscpCode)
|
||||
dst.IPPrecedenceCode = int(aux.IPPrecedenceCode)
|
||||
dst.Queue = int(aux.Queue)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type PortProfileQOSMatching struct {
|
||||
CosCode int `json:"cos_code,omitempty"` // [0-7]
|
||||
DscpCode int `json:"dscp_code,omitempty"` // [0-9]|[1-5][0-9]|6[0-3]
|
||||
DstPort int `json:"dst_port,omitempty"` // [0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-4]|65535
|
||||
IPPrecedenceCode int `json:"ip_precedence_code,omitempty"` // [0-7]
|
||||
Protocol string `json:"protocol,omitempty"` // ([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|ah|ax.25|dccp|ddp|egp|eigrp|encap|esp|etherip|fc|ggp|gre|hip|hmp|icmp|idpr-cmtp|idrp|igmp|igp|ip|ipcomp|ipencap|ipip|ipv6|ipv6-frag|ipv6-icmp|ipv6-nonxt|ipv6-opts|ipv6-route|isis|iso-tp4|l2tp|manet|mobility-header|mpls-in-ip|ospf|pim|pup|rdp|rohc|rspf|rsvp|sctp|shim6|skip|st|tcp|udp|udplite|vmtp|vrrp|wesp|xns-idp|xtp
|
||||
SrcPort int `json:"src_port,omitempty"` // [0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-4]|65535
|
||||
}
|
||||
|
||||
func (dst *PortProfileQOSMatching) UnmarshalJSON(b []byte) error {
|
||||
type Alias PortProfileQOSMatching
|
||||
aux := &struct {
|
||||
CosCode emptyStringInt `json:"cos_code"`
|
||||
DscpCode emptyStringInt `json:"dscp_code"`
|
||||
DstPort emptyStringInt `json:"dst_port"`
|
||||
IPPrecedenceCode emptyStringInt `json:"ip_precedence_code"`
|
||||
SrcPort emptyStringInt `json:"src_port"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.CosCode = int(aux.CosCode)
|
||||
dst.DscpCode = int(aux.DscpCode)
|
||||
dst.DstPort = int(aux.DstPort)
|
||||
dst.IPPrecedenceCode = int(aux.IPPrecedenceCode)
|
||||
dst.SrcPort = int(aux.SrcPort)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type PortProfileQOSPolicies struct {
|
||||
QOSMarking PortProfileQOSMarking `json:"qos_marking,omitempty"`
|
||||
QOSMatching PortProfileQOSMatching `json:"qos_matching,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *PortProfileQOSPolicies) UnmarshalJSON(b []byte) error {
|
||||
type Alias PortProfileQOSPolicies
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type PortProfileQOSProfile struct {
|
||||
QOSPolicies []PortProfileQOSPolicies `json:"qos_policies,omitempty"`
|
||||
QOSProfileMode string `json:"qos_profile_mode,omitempty"` // custom|unifi_play|aes67_audio|crestron_audio_video|dante_audio|ndi_aes67_audio|ndi_dante_audio|qsys_audio_video|qsys_video_dante_audio|sdvoe_aes67_audio|sdvoe_dante_audio|shure_audio
|
||||
}
|
||||
|
||||
func (dst *PortProfileQOSProfile) UnmarshalJSON(b []byte) error {
|
||||
type Alias PortProfileQOSProfile
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) listPortProfile(ctx context.Context, site string) ([]PortProfile, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
|
||||
108
unifi/setting_dashboard.generated.go
generated
Normal file
108
unifi/setting_dashboard.generated.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingDashboard struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
LayoutPreference string `json:"layout_preference,omitempty"` // auto|custom
|
||||
Widgets []SettingDashboardWidgets `json:"widgets,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingDashboard) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingDashboard
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingDashboardWidgets struct {
|
||||
Name string `json:"name,omitempty"` // traffic_identification|connection_types|wifi_technology|most_active_clients|most_active_aps|meshing|network_activity|wireless_experience|internet|wifi_activity|wifi_channels|wifi_client_experience|wifi_tx_retries|admin_activity|device_client_count|server_ip
|
||||
}
|
||||
|
||||
func (dst *SettingDashboardWidgets) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingDashboardWidgets
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingDashboard(ctx context.Context, site string) (*SettingDashboard, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingDashboard `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/dashboard", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingDashboard(ctx context.Context, site string, d *SettingDashboard) (*SettingDashboard, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingDashboard `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "dashboard"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/dashboard", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
88
unifi/setting_doh.generated.go
generated
Normal file
88
unifi/setting_doh.generated.go
generated
Normal file
@@ -0,0 +1,88 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingDoh struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
ServerNames []string `json:"server_names,omitempty"`
|
||||
State string `json:"state,omitempty"` // off|auto|manual
|
||||
}
|
||||
|
||||
func (dst *SettingDoh) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingDoh
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingDoh(ctx context.Context, site string) (*SettingDoh, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingDoh `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/doh", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingDoh(ctx context.Context, site string, d *SettingDoh) (*SettingDoh, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingDoh `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "doh"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/doh", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
130
unifi/setting_ether_lighting.generated.go
generated
Normal file
130
unifi/setting_ether_lighting.generated.go
generated
Normal file
@@ -0,0 +1,130 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingEtherLighting struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
NetworkOverrides []SettingEtherLightingNetworkOverrides `json:"network_overrides,omitempty"`
|
||||
SpeedOverrides []SettingEtherLightingSpeedOverrides `json:"speed_overrides,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingEtherLighting) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingEtherLighting
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingEtherLightingNetworkOverrides struct {
|
||||
Key string `json:"key,omitempty"`
|
||||
RawColorHex string `json:"raw_color_hex,omitempty"` // [0-9A-Fa-f]{6}
|
||||
}
|
||||
|
||||
func (dst *SettingEtherLightingNetworkOverrides) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingEtherLightingNetworkOverrides
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingEtherLightingSpeedOverrides struct {
|
||||
Key string `json:"key,omitempty"` // FE|GbE|2.5GbE|5GbE|10GbE|25GbE|40GbE|100GbE
|
||||
RawColorHex string `json:"raw_color_hex,omitempty"` // [0-9A-Fa-f]{6}
|
||||
}
|
||||
|
||||
func (dst *SettingEtherLightingSpeedOverrides) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingEtherLightingSpeedOverrides
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingEtherLighting(ctx context.Context, site string) (*SettingEtherLighting, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingEtherLighting `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/ether_lighting", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingEtherLighting(ctx context.Context, site string, d *SettingEtherLighting) (*SettingEtherLighting, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingEtherLighting `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "ether_lighting"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/ether_lighting", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
87
unifi/setting_evaluation_score.generated.go
generated
Normal file
87
unifi/setting_evaluation_score.generated.go
generated
Normal file
@@ -0,0 +1,87 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingEvaluationScore struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
DismissedIDs []string `json:"dismissed_ids,omitempty"` // ^[a-zA-Z]{2}[0-9]{2,3}$|^$
|
||||
}
|
||||
|
||||
func (dst *SettingEvaluationScore) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingEvaluationScore
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingEvaluationScore(ctx context.Context, site string) (*SettingEvaluationScore, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingEvaluationScore `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/evaluation_score", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingEvaluationScore(ctx context.Context, site string, d *SettingEvaluationScore) (*SettingEvaluationScore, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingEvaluationScore `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "evaluation_score"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/evaluation_score", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
88
unifi/setting_global_nat.generated.go
generated
Normal file
88
unifi/setting_global_nat.generated.go
generated
Normal file
@@ -0,0 +1,88 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingGlobalNat struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
ExcludedNetworkIDs []string `json:"excluded_network_ids,omitempty"`
|
||||
Mode string `json:"mode,omitempty"` // auto|custom|off
|
||||
}
|
||||
|
||||
func (dst *SettingGlobalNat) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingGlobalNat
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingGlobalNat(ctx context.Context, site string) (*SettingGlobalNat, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingGlobalNat `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/global_nat", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingGlobalNat(ctx context.Context, site string, d *SettingGlobalNat) (*SettingGlobalNat, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingGlobalNat `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "global_nat"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/global_nat", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
39
unifi/setting_global_switch.generated.go
generated
39
unifi/setting_global_switch.generated.go
generated
@@ -27,14 +27,16 @@ type SettingGlobalSwitch struct {
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
DHCPSnoop bool `json:"dhcp_snoop"`
|
||||
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id"` // [\d\w]+|
|
||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled"`
|
||||
FlowctrlEnabled bool `json:"flowctrl_enabled"`
|
||||
JumboframeEnabled bool `json:"jumboframe_enabled"`
|
||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
||||
SwitchExclusions []string `json:"switch_exclusions,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||
AclDeviceIsolation []string `json:"acl_device_isolation,omitempty"`
|
||||
AclL3Isolation []SettingGlobalSwitchAclL3Isolation `json:"acl_l3_isolation,omitempty"`
|
||||
DHCPSnoop bool `json:"dhcp_snoop"`
|
||||
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id"` // [\d\w]+|
|
||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled"`
|
||||
FlowctrlEnabled bool `json:"flowctrl_enabled"`
|
||||
JumboframeEnabled bool `json:"jumboframe_enabled"`
|
||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
||||
SwitchExclusions []string `json:"switch_exclusions,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||
}
|
||||
|
||||
func (dst *SettingGlobalSwitch) UnmarshalJSON(b []byte) error {
|
||||
@@ -53,6 +55,27 @@ func (dst *SettingGlobalSwitch) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingGlobalSwitchAclL3Isolation struct {
|
||||
DestinationNetworks []string `json:"destination_networks,omitempty"`
|
||||
SourceNetwork string `json:"source_network,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingGlobalSwitchAclL3Isolation) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingGlobalSwitchAclL3Isolation
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingGlobalSwitch(ctx context.Context, site string) (*SettingGlobalSwitch, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
|
||||
1
unifi/setting_guest_access.generated.go
generated
1
unifi/setting_guest_access.generated.go
generated
@@ -29,6 +29,7 @@ type SettingGuestAccess struct {
|
||||
|
||||
AllowedSubnet string `json:"allowed_subnet_,omitempty"`
|
||||
Auth string `json:"auth,omitempty"` // none|hotspot|facebook_wifi|custom
|
||||
AuthUrl string `json:"auth_url,omitempty"`
|
||||
AuthorizeUseSandbox bool `json:"authorize_use_sandbox"`
|
||||
CustomIP string `json:"custom_ip"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||
EcEnabled bool `json:"ec_enabled"`
|
||||
|
||||
26
unifi/setting_ips.generated.go
generated
26
unifi/setting_ips.generated.go
generated
@@ -27,18 +27,20 @@ type SettingIps struct {
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
AdBlockingConfigurations []SettingIpsAdBlockingConfigurations `json:"ad_blocking_configurations,omitempty"`
|
||||
AdBlockingEnabled bool `json:"ad_blocking_enabled"`
|
||||
DNSFiltering bool `json:"dns_filtering"`
|
||||
DNSFilters []SettingIpsDNSFilters `json:"dns_filters,omitempty"`
|
||||
EnabledCategories []string `json:"enabled_categories,omitempty"` // emerging-activex|emerging-attackresponse|botcc|emerging-chat|ciarmy|compromised|emerging-dns|emerging-dos|dshield|emerging-exploit|emerging-ftp|emerging-games|emerging-icmp|emerging-icmpinfo|emerging-imap|emerging-inappropriate|emerging-info|emerging-malware|emerging-misc|emerging-mobile|emerging-netbios|emerging-p2p|emerging-policy|emerging-pop3|emerging-rpc|emerging-scada|emerging-scan|emerging-shellcode|emerging-smtp|emerging-snmp|emerging-sql|emerging-telnet|emerging-tftp|tor|emerging-trojan|emerging-useragent|emerging-voip|emerging-webapps|emerging-webclient|emerging-webserver|emerging-worm
|
||||
Honeypot []SettingIpsHoneypot `json:"honeypot,omitempty"`
|
||||
HoneypotEnabled bool `json:"honeypot_enabled"`
|
||||
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
||||
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
||||
RestrictTor bool `json:"restrict_tor"`
|
||||
RestrictTorrents bool `json:"restrict_torrents"`
|
||||
Suppression SettingIpsSuppression `json:"suppression,omitempty"`
|
||||
AdBlockingConfigurations []SettingIpsAdBlockingConfigurations `json:"ad_blocking_configurations,omitempty"`
|
||||
AdBlockingEnabled bool `json:"ad_blocking_enabled"`
|
||||
AdvancedFilteringPreference string `json:"advanced_filtering_preference,omitempty"` // |auto|manual|disabled
|
||||
DNSFiltering bool `json:"dns_filtering"`
|
||||
DNSFilters []SettingIpsDNSFilters `json:"dns_filters,omitempty"`
|
||||
EnabledCategories []string `json:"enabled_categories,omitempty"` // emerging-activex|emerging-attackresponse|botcc|emerging-chat|ciarmy|compromised|emerging-dns|emerging-dos|dshield|emerging-exploit|emerging-ftp|emerging-games|emerging-icmp|emerging-icmpinfo|emerging-imap|emerging-inappropriate|emerging-info|emerging-malware|emerging-misc|emerging-mobile|emerging-netbios|emerging-p2p|emerging-policy|emerging-pop3|emerging-rpc|emerging-scada|emerging-scan|emerging-shellcode|emerging-smtp|emerging-snmp|emerging-sql|emerging-telnet|emerging-tftp|tor|emerging-trojan|emerging-useragent|emerging-voip|emerging-webapps|emerging-webclient|emerging-webserver|emerging-worm
|
||||
EnabledNetworks []string `json:"enabled_networks,omitempty"`
|
||||
Honeypot []SettingIpsHoneypot `json:"honeypot,omitempty"`
|
||||
HoneypotEnabled bool `json:"honeypot_enabled"`
|
||||
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
||||
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
||||
RestrictTor bool `json:"restrict_tor"`
|
||||
RestrictTorrents bool `json:"restrict_torrents"`
|
||||
Suppression SettingIpsSuppression `json:"suppression,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingIps) UnmarshalJSON(b []byte) error {
|
||||
|
||||
8
unifi/setting_radio_ai.generated.go
generated
8
unifi/setting_radio_ai.generated.go
generated
@@ -28,6 +28,7 @@ type SettingRadioAi struct {
|
||||
Key string `json:"key"`
|
||||
|
||||
AutoAdjustChannelsToCountry bool `json:"auto_adjust_channels_to_country"`
|
||||
Channels6E []int `json:"channels_6e,omitempty"` // [1-9]|[1-2][0-9]|3[3-9]|[4-5][0-9]|6[0-1]|6[5-9]|[7-8][0-9]|9[0-3]|9[7-9]|1[0-1][0-9]|12[0-5]|129|1[3-4][0-9]|15[0-7]|16[1-9]|1[7-8][0-9]|19[3-9]|2[0-1][0-9]|22[0-1]|22[5-9]|233
|
||||
ChannelsNa []int `json:"channels_na,omitempty"` // 34|36|38|40|42|44|46|48|52|56|60|64|100|104|108|112|116|120|124|128|132|136|140|144|149|153|157|161|165|169
|
||||
ChannelsNg []int `json:"channels_ng,omitempty"` // 1|2|3|4|5|6|7|8|9|10|11|12|13|14
|
||||
CronExpr string `json:"cron_expr,omitempty"`
|
||||
@@ -39,12 +40,13 @@ type SettingRadioAi struct {
|
||||
Optimize []string `json:"optimize,omitempty"` // channel|power
|
||||
Radios []string `json:"radios,omitempty"` // na|ng
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
UseXY bool `json:"useXY"`
|
||||
UseXy bool `json:"useXY"`
|
||||
}
|
||||
|
||||
func (dst *SettingRadioAi) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingRadioAi
|
||||
aux := &struct {
|
||||
Channels6E []emptyStringInt `json:"channels_6e"`
|
||||
ChannelsNa []emptyStringInt `json:"channels_na"`
|
||||
ChannelsNg []emptyStringInt `json:"channels_ng"`
|
||||
HtModesNa []emptyStringInt `json:"ht_modes_na"`
|
||||
@@ -59,6 +61,10 @@ func (dst *SettingRadioAi) UnmarshalJSON(b []byte) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.Channels6E = make([]int, len(aux.Channels6E))
|
||||
for i, v := range aux.Channels6E {
|
||||
dst.Channels6E[i] = int(v)
|
||||
}
|
||||
dst.ChannelsNa = make([]int, len(aux.ChannelsNa))
|
||||
for i, v := range aux.ChannelsNa {
|
||||
dst.ChannelsNa[i] = int(v)
|
||||
|
||||
2
unifi/setting_radius.generated.go
generated
2
unifi/setting_radius.generated.go
generated
@@ -34,7 +34,7 @@ type SettingRadius struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
InterimUpdateInterval int `json:"interim_update_interval,omitempty"` // ^([6-9][0-9]|[1-9][0-9]{2,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9][0-9]|86400)$
|
||||
TunneledReply bool `json:"tunneled_reply"`
|
||||
XSecret string `json:"x_secret,omitempty"` // [^\"\' ]{1,48}
|
||||
XSecret string `json:"x_secret,omitempty"` // ^[^\\"' ]{1,48}$
|
||||
}
|
||||
|
||||
func (dst *SettingRadius) UnmarshalJSON(b []byte) error {
|
||||
|
||||
87
unifi/setting_ssl_inspection.generated.go
generated
Normal file
87
unifi/setting_ssl_inspection.generated.go
generated
Normal file
@@ -0,0 +1,87 @@
|
||||
// Code generated from ace.jar fields *.json files
|
||||
// DO NOT EDIT.
|
||||
|
||||
package unifi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// just to fix compile issues with the import
|
||||
var (
|
||||
_ context.Context
|
||||
_ fmt.Formatter
|
||||
_ json.Marshaler
|
||||
)
|
||||
|
||||
type SettingSslInspection struct {
|
||||
ID string `json:"_id,omitempty"`
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
|
||||
Hidden bool `json:"attr_hidden,omitempty"`
|
||||
HiddenID string `json:"attr_hidden_id,omitempty"`
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
State string `json:"state,omitempty"` // off|simple|advanced
|
||||
}
|
||||
|
||||
func (dst *SettingSslInspection) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingSslInspection
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) getSettingSslInspection(ctx context.Context, site string) (*SettingSslInspection, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingSslInspection `json:"data"`
|
||||
}
|
||||
|
||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/ssl_inspection", site), nil, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
d := respBody.Data[0]
|
||||
return &d, nil
|
||||
}
|
||||
|
||||
func (c *Client) updateSettingSslInspection(ctx context.Context, site string, d *SettingSslInspection) (*SettingSslInspection, error) {
|
||||
var respBody struct {
|
||||
Meta meta `json:"meta"`
|
||||
Data []SettingSslInspection `json:"data"`
|
||||
}
|
||||
|
||||
d.Key = "ssl_inspection"
|
||||
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/ssl_inspection", site), d, &respBody)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(respBody.Data) != 1 {
|
||||
return nil, &NotFoundError{}
|
||||
}
|
||||
|
||||
new := respBody.Data[0]
|
||||
|
||||
return &new, nil
|
||||
}
|
||||
1
unifi/setting_super_mgmt.generated.go
generated
1
unifi/setting_super_mgmt.generated.go
generated
@@ -52,7 +52,6 @@ type SettingSuperMgmt struct {
|
||||
ContactInfoState string `json:"contact_info_state,omitempty"`
|
||||
ContactInfoZip string `json:"contact_info_zip,omitempty"`
|
||||
DataRetentionSettingPreference string `json:"data_retention_setting_preference,omitempty"` // auto|manual
|
||||
DataRetentionTimeEnabled bool `json:"data_retention_time_enabled"`
|
||||
DataRetentionTimeInHoursFor5MinutesScale int `json:"data_retention_time_in_hours_for_5minutes_scale,omitempty"`
|
||||
DataRetentionTimeInHoursForDailyScale int `json:"data_retention_time_in_hours_for_daily_scale,omitempty"`
|
||||
DataRetentionTimeInHoursForHourlyScale int `json:"data_retention_time_in_hours_for_hourly_scale,omitempty"`
|
||||
|
||||
2
unifi/version.generated.go
generated
2
unifi/version.generated.go
generated
@@ -2,4 +2,4 @@
|
||||
|
||||
package unifi
|
||||
|
||||
const UnifiVersion = "7.4.162"
|
||||
const UnifiVersion = "8.2.93"
|
||||
|
||||
26
unifi/wlan.generated.go
generated
26
unifi/wlan.generated.go
generated
@@ -26,6 +26,7 @@ type WLAN struct {
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
ApGroupIDs []string `json:"ap_group_ids,omitempty"`
|
||||
ApGroupMode string `json:"ap_group_mode,omitempty"` // all|groups|devices
|
||||
AuthCache bool `json:"auth_cache"`
|
||||
BSupported bool `json:"b_supported"`
|
||||
BroadcastFilterEnabled bool `json:"bc_filter_enabled"`
|
||||
@@ -59,6 +60,7 @@ type WLAN struct {
|
||||
MinrateNgDataRateKbps int `json:"minrate_ng_data_rate_kbps,omitempty"`
|
||||
MinrateNgEnabled bool `json:"minrate_ng_enabled"`
|
||||
MinrateSettingPreference string `json:"minrate_setting_preference,omitempty"` // auto|manual
|
||||
MloEnabled bool `json:"mlo_enabled"`
|
||||
MulticastEnhanceEnabled bool `json:"mcastenhance_enabled"`
|
||||
Name string `json:"name,omitempty"` // .{1,32}
|
||||
NameCombineEnabled bool `json:"name_combine_enabled"`
|
||||
@@ -71,6 +73,8 @@ type WLAN struct {
|
||||
PMFCipher string `json:"pmf_cipher,omitempty"` // auto|aes-128-cmac|bip-gmac-256
|
||||
PMFMode string `json:"pmf_mode,omitempty"` // disabled|optional|required
|
||||
Priority string `json:"priority,omitempty"` // medium|high|low
|
||||
PrivatePresharedKeys []WLANPrivatePresharedKeys `json:"private_preshared_keys,omitempty"`
|
||||
PrivatePresharedKeysEnabled bool `json:"private_preshared_keys_enabled"`
|
||||
ProxyArp bool `json:"proxy_arp"`
|
||||
RADIUSDasEnabled bool `json:"radius_das_enabled"`
|
||||
RADIUSMACAuthEnabled bool `json:"radius_mac_auth_enabled"`
|
||||
@@ -92,6 +96,7 @@ type WLAN struct {
|
||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||
TdlsProhibit bool `json:"tdls_prohibit"`
|
||||
UapsdEnabled bool `json:"uapsd_enabled"`
|
||||
UidWorkspaceUrl string `json:"uid_workspace_url,omitempty"`
|
||||
UserGroupID string `json:"usergroup_id"`
|
||||
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-5]|^$
|
||||
VLANEnabled bool `json:"vlan_enabled"`
|
||||
@@ -155,6 +160,27 @@ func (dst *WLAN) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type WLANPrivatePresharedKeys struct {
|
||||
NetworkID string `json:"networkconf_id"`
|
||||
Password string `json:"password,omitempty"` // [\x20-\x7E]{8,255}
|
||||
}
|
||||
|
||||
func (dst *WLANPrivatePresharedKeys) UnmarshalJSON(b []byte) error {
|
||||
type Alias WLANPrivatePresharedKeys
|
||||
aux := &struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type WLANSaePsk struct {
|
||||
ID string `json:"id"` // .{0,128}
|
||||
MAC string `json:"mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||
|
||||
Reference in New Issue
Block a user