[create-pull-request] automated change (#98)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ad9e8f2d74
commit
2ee9596dad
164
unifi/device.generated.go
generated
164
unifi/device.generated.go
generated
@@ -27,80 +27,85 @@ type Device struct {
|
|||||||
|
|
||||||
MAC string `json:"mac,omitempty"`
|
MAC string `json:"mac,omitempty"`
|
||||||
|
|
||||||
Adopted bool `json:"adopted"`
|
Adopted bool `json:"adopted"`
|
||||||
AtfEnabled bool `json:"atf_enabled,omitempty"`
|
AtfEnabled bool `json:"atf_enabled,omitempty"`
|
||||||
BandsteeringMode string `json:"bandsteering_mode,omitempty"` // off|equal|prefer_5g
|
BandsteeringMode string `json:"bandsteering_mode,omitempty"` // off|equal|prefer_5g
|
||||||
BaresipAuthUser string `json:"baresip_auth_user,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
BaresipAuthUser string `json:"baresip_auth_user,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
||||||
BaresipEnabled bool `json:"baresip_enabled,omitempty"`
|
BaresipEnabled bool `json:"baresip_enabled,omitempty"`
|
||||||
BaresipExtension string `json:"baresip_extension,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
BaresipExtension string `json:"baresip_extension,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
||||||
ConfigNetwork DeviceConfigNetwork `json:"config_network,omitempty"`
|
ConfigNetwork DeviceConfigNetwork `json:"config_network,omitempty"`
|
||||||
DPIEnabled bool `json:"dpi_enabled,omitempty"`
|
ConnectedBatteryOverrides []DeviceConnectedBatteryOverrides `json:"connected_battery_overrides,omitempty"`
|
||||||
Disabled bool `json:"disabled,omitempty"`
|
DPIEnabled bool `json:"dpi_enabled,omitempty"`
|
||||||
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id,omitempty"` // [\d\w]+|
|
Disabled bool `json:"disabled,omitempty"`
|
||||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id,omitempty"` // [\d\w]+|
|
||||||
EthernetOverrides []DeviceEthernetOverrides `json:"ethernet_overrides,omitempty"`
|
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
||||||
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
EthernetOverrides []DeviceEthernetOverrides `json:"ethernet_overrides,omitempty"`
|
||||||
HeightInMeters float64 `json:"heightInMeters,omitempty"`
|
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
||||||
Hostname string `json:"hostname,omitempty"` // .{1,128}
|
GatewayVrrpMode string `json:"gateway_vrrp_mode,omitempty"` // primary|secondary
|
||||||
JumboframeEnabled bool `json:"jumboframe_enabled,omitempty"`
|
GatewayVrrpPriority int `json:"gateway_vrrp_priority,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]
|
||||||
LcmBrightness int `json:"lcm_brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
HeightInMeters float64 `json:"heightInMeters,omitempty"`
|
||||||
LcmBrightnessOverride bool `json:"lcm_brightness_override,omitempty"`
|
Hostname string `json:"hostname,omitempty"` // .{1,128}
|
||||||
LcmIDleTimeout int `json:"lcm_idle_timeout,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-5][0-9][0-9]|3600
|
JumboframeEnabled bool `json:"jumboframe_enabled,omitempty"`
|
||||||
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
LcmBrightness int `json:"lcm_brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
||||||
LcmNightModeBegins string `json:"lcm_night_mode_begins,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
LcmBrightnessOverride bool `json:"lcm_brightness_override,omitempty"`
|
||||||
LcmNightModeEnabled bool `json:"lcm_night_mode_enabled,omitempty"`
|
LcmIDleTimeout int `json:"lcm_idle_timeout,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-5][0-9][0-9]|3600
|
||||||
LcmNightModeEnds string `json:"lcm_night_mode_ends,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
||||||
LcmSettingsRestrictedAccess bool `json:"lcm_settings_restricted_access,omitempty"`
|
LcmNightModeBegins string `json:"lcm_night_mode_begins,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
||||||
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
LcmNightModeEnabled bool `json:"lcm_night_mode_enabled,omitempty"`
|
||||||
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
LcmNightModeEnds string `json:"lcm_night_mode_ends,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
||||||
LedOverride string `json:"led_override,omitempty"` // default|on|off
|
LcmSettingsRestrictedAccess bool `json:"lcm_settings_restricted_access,omitempty"`
|
||||||
LedOverrideColor string `json:"led_override_color,omitempty"` // ^#(?:[0-9a-fA-F]{3}){1,2}$
|
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
||||||
LedOverrideColorBrightness int `json:"led_override_color_brightness,omitempty"` // ^[0-9][0-9]?$|^100$
|
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
||||||
Locked bool `json:"locked,omitempty"`
|
LedOverride string `json:"led_override,omitempty"` // default|on|off
|
||||||
LteApn string `json:"lte_apn,omitempty"` // .{1,128}
|
LedOverrideColor string `json:"led_override_color,omitempty"` // ^#(?:[0-9a-fA-F]{3}){1,2}$
|
||||||
LteAuthType string `json:"lte_auth_type,omitempty"` // PAP|CHAP|PAP-CHAP|NONE
|
LedOverrideColorBrightness int `json:"led_override_color_brightness,omitempty"` // ^[0-9][0-9]?$|^100$
|
||||||
LteDataLimitEnabled bool `json:"lte_data_limit_enabled,omitempty"`
|
Locked bool `json:"locked,omitempty"`
|
||||||
LteDataWarningEnabled bool `json:"lte_data_warning_enabled,omitempty"`
|
LowpfmodeOverride bool `json:"lowpfmode_override,omitempty"`
|
||||||
LteExtAnt bool `json:"lte_ext_ant,omitempty"`
|
LteApn string `json:"lte_apn,omitempty"` // .{1,128}
|
||||||
LteHardLimit int `json:"lte_hard_limit,omitempty"`
|
LteAuthType string `json:"lte_auth_type,omitempty"` // PAP|CHAP|PAP-CHAP|NONE
|
||||||
LtePassword string `json:"lte_password,omitempty"`
|
LteDataLimitEnabled bool `json:"lte_data_limit_enabled,omitempty"`
|
||||||
LtePoe bool `json:"lte_poe,omitempty"`
|
LteDataWarningEnabled bool `json:"lte_data_warning_enabled,omitempty"`
|
||||||
LteRoamingAllowed bool `json:"lte_roaming_allowed,omitempty"`
|
LteExtAnt bool `json:"lte_ext_ant,omitempty"`
|
||||||
LteSimPin int `json:"lte_sim_pin,omitempty"`
|
LteHardLimit int `json:"lte_hard_limit,omitempty"`
|
||||||
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
|
LtePassword string `json:"lte_password,omitempty"`
|
||||||
LteUsername string `json:"lte_username,omitempty"`
|
LtePoe bool `json:"lte_poe,omitempty"`
|
||||||
MapID string `json:"map_id,omitempty"`
|
LteRoamingAllowed bool `json:"lte_roaming_allowed,omitempty"`
|
||||||
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
|
LteSimPin int `json:"lte_sim_pin,omitempty"`
|
||||||
MgmtNetworkID string `json:"mgmt_network_id,omitempty"` // [\d\w]+
|
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{0,128}
|
LteUsername string `json:"lte_username,omitempty"`
|
||||||
OutdoorModeOverride string `json:"outdoor_mode_override,omitempty"` // default|on|off
|
MapID string `json:"map_id,omitempty"`
|
||||||
OutletEnabled bool `json:"outlet_enabled,omitempty"`
|
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
|
||||||
OutletOverrides []DeviceOutletOverrides `json:"outlet_overrides,omitempty"`
|
MgmtNetworkID string `json:"mgmt_network_id,omitempty"` // [\d\w]+
|
||||||
OutletPowerCycleEnabled bool `json:"outlet_power_cycle_enabled,omitempty"`
|
Name string `json:"name,omitempty"` // .{0,128}
|
||||||
PortOverrides []DevicePortOverrides `json:"port_overrides,omitempty"`
|
OutdoorModeOverride string `json:"outdoor_mode_override,omitempty"` // default|on|off
|
||||||
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
OutletEnabled bool `json:"outlet_enabled,omitempty"`
|
||||||
PowerSourceCtrlEnabled bool `json:"power_source_ctrl_enabled,omitempty"`
|
OutletOverrides []DeviceOutletOverrides `json:"outlet_overrides,omitempty"`
|
||||||
RADIUSProfileID string `json:"radiusprofile_id,omitempty"`
|
OutletPowerCycleEnabled bool `json:"outlet_power_cycle_enabled,omitempty"`
|
||||||
RadioTable []DeviceRadioTable `json:"radio_table,omitempty"`
|
PortOverrides []DevicePortOverrides `json:"port_overrides,omitempty"`
|
||||||
ResetbtnEnabled string `json:"resetbtn_enabled,omitempty"` // on|off
|
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
||||||
RpsOverride DeviceRpsOverride `json:"rps_override,omitempty"`
|
PowerSourceCtrlEnabled bool `json:"power_source_ctrl_enabled,omitempty"`
|
||||||
SnmpContact string `json:"snmp_contact,omitempty"` // .{0,255}
|
RADIUSProfileID string `json:"radiusprofile_id,omitempty"`
|
||||||
SnmpLocation string `json:"snmp_location,omitempty"` // .{0,255}
|
RadioTable []DeviceRadioTable `json:"radio_table,omitempty"`
|
||||||
State DeviceState `json:"state"`
|
ResetbtnEnabled string `json:"resetbtn_enabled,omitempty"` // on|off
|
||||||
StpPriority string `json:"stp_priority,omitempty"` // 0|4096|8192|12288|16384|20480|24576|28672|32768|36864|40960|45056|49152|53248|57344|61440
|
RpsOverride DeviceRpsOverride `json:"rps_override,omitempty"`
|
||||||
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
SnmpContact string `json:"snmp_contact,omitempty"` // .{0,255}
|
||||||
SwitchVLANEnabled bool `json:"switch_vlan_enabled,omitempty"`
|
SnmpLocation string `json:"snmp_location,omitempty"` // .{0,255}
|
||||||
UbbPairName string `json:"ubb_pair_name,omitempty"` // .{1,128}
|
State DeviceState `json:"state"`
|
||||||
Volume int `json:"volume,omitempty"` // [0-9]|[1-9][0-9]|100
|
StpPriority string `json:"stp_priority,omitempty"` // 0|4096|8192|12288|16384|20480|24576|28672|32768|36864|40960|45056|49152|53248|57344|61440
|
||||||
WLANOverrides []DeviceWLANOverrides `json:"wlan_overrides,omitempty"`
|
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
||||||
X float64 `json:"x,omitempty"`
|
SwitchVLANEnabled bool `json:"switch_vlan_enabled,omitempty"`
|
||||||
XBaresipPassword string `json:"x_baresip_password,omitempty"` // ^[a-zA-Z0-9_.\-!~*'()]*
|
UbbPairName string `json:"ubb_pair_name,omitempty"` // .{1,128}
|
||||||
Y float64 `json:"y,omitempty"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *Device) UnmarshalJSON(b []byte) error {
|
func (dst *Device) UnmarshalJSON(b []byte) error {
|
||||||
type Alias Device
|
type Alias Device
|
||||||
aux := &struct {
|
aux := &struct {
|
||||||
|
GatewayVrrpPriority emptyStringInt `json:"gateway_vrrp_priority"`
|
||||||
LcmBrightness emptyStringInt `json:"lcm_brightness"`
|
LcmBrightness emptyStringInt `json:"lcm_brightness"`
|
||||||
LcmIDleTimeout emptyStringInt `json:"lcm_idle_timeout"`
|
LcmIDleTimeout emptyStringInt `json:"lcm_idle_timeout"`
|
||||||
LedOverrideColorBrightness emptyStringInt `json:"led_override_color_brightness"`
|
LedOverrideColorBrightness emptyStringInt `json:"led_override_color_brightness"`
|
||||||
@@ -121,6 +126,7 @@ func (dst *Device) UnmarshalJSON(b []byte) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||||
}
|
}
|
||||||
|
dst.GatewayVrrpPriority = int(aux.GatewayVrrpPriority)
|
||||||
dst.LcmBrightness = int(aux.LcmBrightness)
|
dst.LcmBrightness = int(aux.LcmBrightness)
|
||||||
dst.LcmIDleTimeout = int(aux.LcmIDleTimeout)
|
dst.LcmIDleTimeout = int(aux.LcmIDleTimeout)
|
||||||
dst.LedOverrideColorBrightness = int(aux.LedOverrideColorBrightness)
|
dst.LedOverrideColorBrightness = int(aux.LedOverrideColorBrightness)
|
||||||
@@ -162,6 +168,26 @@ func (dst *DeviceConfigNetwork) UnmarshalJSON(b []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DeviceConnectedBatteryOverrides struct {
|
||||||
|
MAC string `json:"mac,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dst *DeviceConnectedBatteryOverrides) UnmarshalJSON(b []byte) error {
|
||||||
|
type Alias DeviceConnectedBatteryOverrides
|
||||||
|
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 DeviceEthernetOverrides struct {
|
type DeviceEthernetOverrides struct {
|
||||||
Ifname string `json:"ifname,omitempty"` // eth[0-9]{1,2}
|
Ifname string `json:"ifname,omitempty"` // eth[0-9]{1,2}
|
||||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?|WAN[2]?
|
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?|WAN[2]?
|
||||||
|
|||||||
14
unifi/network.generated.go
generated
14
unifi/network.generated.go
generated
@@ -113,6 +113,7 @@ type Network struct {
|
|||||||
L2TpAllowWeakCiphers bool `json:"l2tp_allow_weak_ciphers"`
|
L2TpAllowWeakCiphers bool `json:"l2tp_allow_weak_ciphers"`
|
||||||
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan|wan2
|
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])$
|
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"`
|
LteLanEnabled bool `json:"lte_lan_enabled"`
|
||||||
MACOverride string `json:"mac_override"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
MACOverride string `json:"mac_override"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||||
MACOverrideEnabled bool `json:"mac_override_enabled"`
|
MACOverrideEnabled bool `json:"mac_override_enabled"`
|
||||||
@@ -149,7 +150,10 @@ type Network struct {
|
|||||||
VLANEnabled bool `json:"vlan_enabled"`
|
VLANEnabled bool `json:"vlan_enabled"`
|
||||||
VPNClientDefaultRoute bool `json:"vpn_client_default_route"`
|
VPNClientDefaultRoute bool `json:"vpn_client_default_route"`
|
||||||
VPNClientPullDNS bool `json:"vpn_client_pull_dns"`
|
VPNClientPullDNS bool `json:"vpn_client_pull_dns"`
|
||||||
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-client|openvpn-vpn|pptp-client|l2tp-server|pptp-server|uid-server
|
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-client|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]
|
||||||
WANDHCPOptions []NetworkWANDHCPOptions `json:"wan_dhcp_options,omitempty"`
|
WANDHCPOptions []NetworkWANDHCPOptions `json:"wan_dhcp_options,omitempty"`
|
||||||
WANDHCPv6PDSize int `json:"wan_dhcpv6_pd_size,omitempty"` // ^(4[89]|5[0-9]|6[0-4])$|^$
|
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])$|^$
|
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])$|^$
|
||||||
@@ -177,11 +181,15 @@ type Network struct {
|
|||||||
WANUsername string `json:"wan_username,omitempty"` // [^"' ]+
|
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]|^$
|
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"`
|
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"`
|
||||||
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
||||||
XOpenVPNPassword string `json:"x_openvpn_password,omitempty"`
|
XOpenVPNPassword string `json:"x_openvpn_password,omitempty"`
|
||||||
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
||||||
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
||||||
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
|
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
|
||||||
|
XWireguardPrivateKey string `json:"x_wireguard_private_key,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *Network) UnmarshalJSON(b []byte) error {
|
func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||||
@@ -200,12 +208,14 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
|||||||
IPV6RaValidLifetime emptyStringInt `json:"ipv6_ra_valid_lifetime"`
|
IPV6RaValidLifetime emptyStringInt `json:"ipv6_ra_valid_lifetime"`
|
||||||
InternetAccessEnabled *bool `json:"internet_access_enabled"`
|
InternetAccessEnabled *bool `json:"internet_access_enabled"`
|
||||||
IntraNetworkAccessEnabled *bool `json:"intra_network_access_enabled"`
|
IntraNetworkAccessEnabled *bool `json:"intra_network_access_enabled"`
|
||||||
|
LocalPort emptyStringInt `json:"local_port"`
|
||||||
OpenVPNLocalPort emptyStringInt `json:"openvpn_local_port"`
|
OpenVPNLocalPort emptyStringInt `json:"openvpn_local_port"`
|
||||||
OpenVPNRemotePort emptyStringInt `json:"openvpn_remote_port"`
|
OpenVPNRemotePort emptyStringInt `json:"openvpn_remote_port"`
|
||||||
PptpcRouteDistance emptyStringInt `json:"pptpc_route_distance"`
|
PptpcRouteDistance emptyStringInt `json:"pptpc_route_distance"`
|
||||||
Priority emptyStringInt `json:"priority"`
|
Priority emptyStringInt `json:"priority"`
|
||||||
RouteDistance emptyStringInt `json:"route_distance"`
|
RouteDistance emptyStringInt `json:"route_distance"`
|
||||||
VLAN emptyStringInt `json:"vlan"`
|
VLAN emptyStringInt `json:"vlan"`
|
||||||
|
VrrpVrid emptyStringInt `json:"vrrp_vrid"`
|
||||||
WANDHCPv6PDSize emptyStringInt `json:"wan_dhcpv6_pd_size"`
|
WANDHCPv6PDSize emptyStringInt `json:"wan_dhcpv6_pd_size"`
|
||||||
WANEgressQOS emptyStringInt `json:"wan_egress_qos"`
|
WANEgressQOS emptyStringInt `json:"wan_egress_qos"`
|
||||||
WANLoadBalanceWeight emptyStringInt `json:"wan_load_balance_weight"`
|
WANLoadBalanceWeight emptyStringInt `json:"wan_load_balance_weight"`
|
||||||
@@ -236,12 +246,14 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
|||||||
dst.IPV6RaValidLifetime = int(aux.IPV6RaValidLifetime)
|
dst.IPV6RaValidLifetime = int(aux.IPV6RaValidLifetime)
|
||||||
dst.InternetAccessEnabled = emptyBoolToTrue(aux.InternetAccessEnabled)
|
dst.InternetAccessEnabled = emptyBoolToTrue(aux.InternetAccessEnabled)
|
||||||
dst.IntraNetworkAccessEnabled = emptyBoolToTrue(aux.IntraNetworkAccessEnabled)
|
dst.IntraNetworkAccessEnabled = emptyBoolToTrue(aux.IntraNetworkAccessEnabled)
|
||||||
|
dst.LocalPort = int(aux.LocalPort)
|
||||||
dst.OpenVPNLocalPort = int(aux.OpenVPNLocalPort)
|
dst.OpenVPNLocalPort = int(aux.OpenVPNLocalPort)
|
||||||
dst.OpenVPNRemotePort = int(aux.OpenVPNRemotePort)
|
dst.OpenVPNRemotePort = int(aux.OpenVPNRemotePort)
|
||||||
dst.PptpcRouteDistance = int(aux.PptpcRouteDistance)
|
dst.PptpcRouteDistance = int(aux.PptpcRouteDistance)
|
||||||
dst.Priority = int(aux.Priority)
|
dst.Priority = int(aux.Priority)
|
||||||
dst.RouteDistance = int(aux.RouteDistance)
|
dst.RouteDistance = int(aux.RouteDistance)
|
||||||
dst.VLAN = int(aux.VLAN)
|
dst.VLAN = int(aux.VLAN)
|
||||||
|
dst.VrrpVrid = int(aux.VrrpVrid)
|
||||||
dst.WANDHCPv6PDSize = int(aux.WANDHCPv6PDSize)
|
dst.WANDHCPv6PDSize = int(aux.WANDHCPv6PDSize)
|
||||||
dst.WANEgressQOS = int(aux.WANEgressQOS)
|
dst.WANEgressQOS = int(aux.WANEgressQOS)
|
||||||
dst.WANLoadBalanceWeight = int(aux.WANLoadBalanceWeight)
|
dst.WANLoadBalanceWeight = int(aux.WANLoadBalanceWeight)
|
||||||
|
|||||||
42
unifi/setting_ips.generated.go
generated
42
unifi/setting_ips.generated.go
generated
@@ -27,16 +27,18 @@ type SettingIps struct {
|
|||||||
|
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
|
|
||||||
DNSFiltering bool `json:"dns_filtering"`
|
AdBlockingConfigurations []SettingIpsAdBlockingConfigurations `json:"ad_blocking_configurations,omitempty"`
|
||||||
DNSFilters []SettingIpsDNSFilters `json:"dns_filters,omitempty"`
|
AdBlockingEnabled bool `json:"ad_blocking_enabled"`
|
||||||
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
|
DNSFiltering bool `json:"dns_filtering"`
|
||||||
Honeypot []SettingIpsHoneypot `json:"honeypot,omitempty"`
|
DNSFilters []SettingIpsDNSFilters `json:"dns_filters,omitempty"`
|
||||||
HoneypotEnabled bool `json:"honeypot_enabled"`
|
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
|
||||||
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
Honeypot []SettingIpsHoneypot `json:"honeypot,omitempty"`
|
||||||
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
HoneypotEnabled bool `json:"honeypot_enabled"`
|
||||||
RestrictTor bool `json:"restrict_tor"`
|
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
||||||
RestrictTorrents bool `json:"restrict_torrents"`
|
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
||||||
Suppression SettingIpsSuppression `json:"suppression,omitempty"`
|
RestrictTor bool `json:"restrict_tor"`
|
||||||
|
RestrictTorrents bool `json:"restrict_torrents"`
|
||||||
|
Suppression SettingIpsSuppression `json:"suppression,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *SettingIps) UnmarshalJSON(b []byte) error {
|
func (dst *SettingIps) UnmarshalJSON(b []byte) error {
|
||||||
@@ -55,6 +57,26 @@ func (dst *SettingIps) UnmarshalJSON(b []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SettingIpsAdBlockingConfigurations struct {
|
||||||
|
NetworkID string `json:"network_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dst *SettingIpsAdBlockingConfigurations) UnmarshalJSON(b []byte) error {
|
||||||
|
type Alias SettingIpsAdBlockingConfigurations
|
||||||
|
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 SettingIpsAlerts struct {
|
type SettingIpsAlerts struct {
|
||||||
Category string `json:"category,omitempty"`
|
Category string `json:"category,omitempty"`
|
||||||
Gid int `json:"gid,omitempty"`
|
Gid int `json:"gid,omitempty"`
|
||||||
|
|||||||
2
unifi/setting_mgmt.generated.go
generated
2
unifi/setting_mgmt.generated.go
generated
@@ -32,6 +32,8 @@ type SettingMgmt struct {
|
|||||||
AutoUpgrade bool `json:"auto_upgrade"`
|
AutoUpgrade bool `json:"auto_upgrade"`
|
||||||
AutoUpgradeHour int `json:"auto_upgrade_hour,omitempty"` // [0-9]|1[0-9]|2[0-3]|^$
|
AutoUpgradeHour int `json:"auto_upgrade_hour,omitempty"` // [0-9]|1[0-9]|2[0-3]|^$
|
||||||
BootSound bool `json:"boot_sound"`
|
BootSound bool `json:"boot_sound"`
|
||||||
|
DebugToolsEnabled bool `json:"debug_tools_enabled"`
|
||||||
|
DirectConnectEnabled bool `json:"direct_connect_enabled"`
|
||||||
LedEnabled bool `json:"led_enabled"`
|
LedEnabled bool `json:"led_enabled"`
|
||||||
OutdoorModeEnabled bool `json:"outdoor_mode_enabled"`
|
OutdoorModeEnabled bool `json:"outdoor_mode_enabled"`
|
||||||
UnifiIDpEnabled bool `json:"unifi_idp_enabled"`
|
UnifiIDpEnabled bool `json:"unifi_idp_enabled"`
|
||||||
|
|||||||
2
unifi/version.generated.go
generated
2
unifi/version.generated.go
generated
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
package unifi
|
package unifi
|
||||||
|
|
||||||
const UnifiVersion = "7.2.95"
|
const UnifiVersion = "7.3.83"
|
||||||
|
|||||||
Reference in New Issue
Block a user