feat: update to the controller version 9.2.87
This commit is contained in:
committed by
Mateusz Filipowicz
parent
bbbce58b47
commit
831fea8c4b
@@ -1 +1 @@
|
||||
9.0.114
|
||||
9.2.87
|
||||
24
unifi/client.generated.go
generated
24
unifi/client.generated.go
generated
@@ -722,6 +722,14 @@ type Client interface {
|
||||
// UpdateSettingMagicSiteToSiteVpn updates a resource
|
||||
UpdateSettingMagicSiteToSiteVpn(ctx context.Context, site string, s *SettingMagicSiteToSiteVpn) (*SettingMagicSiteToSiteVpn, error)
|
||||
|
||||
// ==== client methods for SettingMdns resource ====
|
||||
|
||||
// GetSettingMdns retrieves the settings for a resource
|
||||
GetSettingMdns(ctx context.Context, site string) (*SettingMdns, error)
|
||||
|
||||
// UpdateSettingMdns updates a resource
|
||||
UpdateSettingMdns(ctx context.Context, site string, s *SettingMdns) (*SettingMdns, error)
|
||||
|
||||
// ==== client methods for SettingMgmt resource ====
|
||||
|
||||
// GetSettingMgmt retrieves the settings for a resource
|
||||
@@ -778,6 +786,14 @@ type Client interface {
|
||||
// UpdateSettingRadius updates a resource
|
||||
UpdateSettingRadius(ctx context.Context, site string, s *SettingRadius) (*SettingRadius, error)
|
||||
|
||||
// ==== client methods for SettingRoamingAssistant resource ====
|
||||
|
||||
// GetSettingRoamingAssistant retrieves the settings for a resource
|
||||
GetSettingRoamingAssistant(ctx context.Context, site string) (*SettingRoamingAssistant, error)
|
||||
|
||||
// UpdateSettingRoamingAssistant updates a resource
|
||||
UpdateSettingRoamingAssistant(ctx context.Context, site string, s *SettingRoamingAssistant) (*SettingRoamingAssistant, error)
|
||||
|
||||
// ==== client methods for SettingRsyslogd resource ====
|
||||
|
||||
// GetSettingRsyslogd retrieves the settings for a resource
|
||||
@@ -874,6 +890,14 @@ type Client interface {
|
||||
// UpdateSettingTeleport updates a resource
|
||||
UpdateSettingTeleport(ctx context.Context, site string, s *SettingTeleport) (*SettingTeleport, error)
|
||||
|
||||
// ==== client methods for SettingTrafficFlow resource ====
|
||||
|
||||
// GetSettingTrafficFlow retrieves the settings for a resource
|
||||
GetSettingTrafficFlow(ctx context.Context, site string) (*SettingTrafficFlow, error)
|
||||
|
||||
// UpdateSettingTrafficFlow updates a resource
|
||||
UpdateSettingTrafficFlow(ctx context.Context, site string, s *SettingTrafficFlow) (*SettingTrafficFlow, error)
|
||||
|
||||
// ==== client methods for SettingUsg resource ====
|
||||
|
||||
// GetSettingUsg retrieves the settings for a resource
|
||||
|
||||
159
unifi/device.generated.go
generated
159
unifi/device.generated.go
generated
@@ -41,10 +41,12 @@ type Device struct {
|
||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
||||
EtherLighting DeviceEtherLighting `json:"ether_lighting,omitempty"`
|
||||
EthernetOverrides []DeviceEthernetOverrides `json:"ethernet_overrides,omitempty"`
|
||||
FanModeOverride string `json:"fan_mode_override,omitempty" validate:"omitempty,oneof=default quiet"` // default|quiet
|
||||
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
||||
GatewayVrrpMode string `json:"gateway_vrrp_mode,omitempty" validate:"omitempty,oneof=primary secondary"` // primary|secondary
|
||||
GatewayVrrpPriority int `json:"gateway_vrrp_priority,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]
|
||||
GreenApEnabled bool `json:"green_ap_enabled,omitempty"`
|
||||
HardwareOffload bool `json:"hardware_offload,omitempty"`
|
||||
HeightInMeters float64 `json:"heightInMeters,omitempty"`
|
||||
Hostname string `json:"hostname,omitempty" validate:"omitempty,gte=1,lte=128"` // .{1,128}
|
||||
JumboframeEnabled bool `json:"jumboframe_enabled,omitempty"`
|
||||
@@ -76,6 +78,7 @@ type Device struct {
|
||||
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
|
||||
LteUsername string `json:"lte_username,omitempty"`
|
||||
MapID string `json:"map_id,omitempty"`
|
||||
Mbb DeviceMbb `json:"mbb,omitempty"`
|
||||
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
|
||||
MgmtNetworkID string `json:"mgmt_network_id,omitempty" validate:"omitempty,w_regex"` // [\d\w]+
|
||||
Model string `json:"model,omitempty"`
|
||||
@@ -181,6 +184,30 @@ func (dst *DeviceConfigNetwork) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceCurrentApn struct {
|
||||
Apn string `json:"apn,omitempty"`
|
||||
AuthType string `json:"auth_type,omitempty" validate:"omitempty,oneof=PAP CHAP PAP-CHAP NONE"` // PAP|CHAP|PAP-CHAP|NONE
|
||||
Password string `json:"password,omitempty"`
|
||||
Roaming bool `json:"roaming,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceCurrentApn) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceCurrentApn
|
||||
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 DeviceEtherLighting struct {
|
||||
Behavior string `json:"behavior,omitempty" validate:"omitempty,oneof=breath steady"` // breath|steady
|
||||
Brightness int `json:"brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
||||
@@ -208,8 +235,9 @@ func (dst *DeviceEtherLighting) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
type DeviceEthernetOverrides struct {
|
||||
Disabled bool `json:"disabled,omitempty"`
|
||||
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-8]?
|
||||
}
|
||||
|
||||
func (dst *DeviceEthernetOverrides) UnmarshalJSON(b []byte) error {
|
||||
@@ -228,6 +256,30 @@ func (dst *DeviceEthernetOverrides) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceMbb struct {
|
||||
PrimarySlot int `json:"primary_slot,omitempty" validate:"omitempty,oneof=1 2"` // 1|2
|
||||
Sim []DeviceSim `json:"sim,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceMbb) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceMbb
|
||||
aux := &struct {
|
||||
PrimarySlot emptyStringInt `json:"primary_slot"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.PrimarySlot = int(aux.PrimarySlot)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceOutletOverrides struct {
|
||||
CycleEnabled bool `json:"cycle_enabled,omitempty"`
|
||||
Index int `json:"index,omitempty"`
|
||||
@@ -255,7 +307,7 @@ func (dst *DeviceOutletOverrides) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
type DevicePortOverrides struct {
|
||||
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [1-8]
|
||||
AggregateMembers []int `json:"aggregate_members,omitempty"` // [1-9]|[1-4][0-9]|5[0-6]
|
||||
Autoneg bool `json:"autoneg,omitempty"`
|
||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty" validate:"omitempty,oneof=auto force_authorized force_unauthorized mac_based multi_host"` // 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]
|
||||
@@ -263,7 +315,8 @@ type DevicePortOverrides struct {
|
||||
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled,omitempty"`
|
||||
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||
FecMode string `json:"fec_mode,omitempty" validate:"omitempty,oneof=rs-fec fc-fec default disabled"` // rs-fec|fc-fec|default|disabled
|
||||
Forward string `json:"forward,omitempty" validate:"omitempty,oneof=all native customize disabled"` // all|native|customize|disabled
|
||||
FlowControlEnabled bool `json:"flow_control_enabled,omitempty"`
|
||||
Forward string `json:"forward,omitempty" validate:"omitempty,oneof=all native customize disabled"` // all|native|customize|disabled
|
||||
FullDuplex bool `json:"full_duplex,omitempty"`
|
||||
Isolation bool `json:"isolation,omitempty"`
|
||||
LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
|
||||
@@ -304,22 +357,22 @@ type DevicePortOverrides struct {
|
||||
func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
||||
type Alias DevicePortOverrides
|
||||
aux := &struct {
|
||||
AggregateNumPorts emptyStringInt `json:"aggregate_num_ports"`
|
||||
Dot1XIDleTimeout emptyStringInt `json:"dot1x_idle_timeout"`
|
||||
EgressRateLimitKbps emptyStringInt `json:"egress_rate_limit_kbps"`
|
||||
MirrorPortIDX emptyStringInt `json:"mirror_port_idx"`
|
||||
PortIDX emptyStringInt `json:"port_idx"`
|
||||
PriorityQueue1Level emptyStringInt `json:"priority_queue1_level"`
|
||||
PriorityQueue2Level emptyStringInt `json:"priority_queue2_level"`
|
||||
PriorityQueue3Level emptyStringInt `json:"priority_queue3_level"`
|
||||
PriorityQueue4Level emptyStringInt `json:"priority_queue4_level"`
|
||||
Speed emptyStringInt `json:"speed"`
|
||||
StormctrlBroadcastastLevel emptyStringInt `json:"stormctrl_bcast_level"`
|
||||
StormctrlBroadcastastRate emptyStringInt `json:"stormctrl_bcast_rate"`
|
||||
StormctrlMcastLevel emptyStringInt `json:"stormctrl_mcast_level"`
|
||||
StormctrlMcastRate emptyStringInt `json:"stormctrl_mcast_rate"`
|
||||
StormctrlUcastLevel emptyStringInt `json:"stormctrl_ucast_level"`
|
||||
StormctrlUcastRate emptyStringInt `json:"stormctrl_ucast_rate"`
|
||||
AggregateMembers []emptyStringInt `json:"aggregate_members"`
|
||||
Dot1XIDleTimeout emptyStringInt `json:"dot1x_idle_timeout"`
|
||||
EgressRateLimitKbps emptyStringInt `json:"egress_rate_limit_kbps"`
|
||||
MirrorPortIDX emptyStringInt `json:"mirror_port_idx"`
|
||||
PortIDX emptyStringInt `json:"port_idx"`
|
||||
PriorityQueue1Level emptyStringInt `json:"priority_queue1_level"`
|
||||
PriorityQueue2Level emptyStringInt `json:"priority_queue2_level"`
|
||||
PriorityQueue3Level emptyStringInt `json:"priority_queue3_level"`
|
||||
PriorityQueue4Level emptyStringInt `json:"priority_queue4_level"`
|
||||
Speed emptyStringInt `json:"speed"`
|
||||
StormctrlBroadcastastLevel emptyStringInt `json:"stormctrl_bcast_level"`
|
||||
StormctrlBroadcastastRate emptyStringInt `json:"stormctrl_bcast_rate"`
|
||||
StormctrlMcastLevel emptyStringInt `json:"stormctrl_mcast_level"`
|
||||
StormctrlMcastRate emptyStringInt `json:"stormctrl_mcast_rate"`
|
||||
StormctrlUcastLevel emptyStringInt `json:"stormctrl_ucast_level"`
|
||||
StormctrlUcastRate emptyStringInt `json:"stormctrl_ucast_rate"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
@@ -330,7 +383,10 @@ func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.AggregateNumPorts = int(aux.AggregateNumPorts)
|
||||
dst.AggregateMembers = make([]int, len(aux.AggregateMembers))
|
||||
for i, v := range aux.AggregateMembers {
|
||||
dst.AggregateMembers[i] = int(v)
|
||||
}
|
||||
dst.Dot1XIDleTimeout = int(aux.Dot1XIDleTimeout)
|
||||
dst.EgressRateLimitKbps = int(aux.EgressRateLimitKbps)
|
||||
dst.MirrorPortIDX = int(aux.MirrorPortIDX)
|
||||
@@ -482,11 +538,14 @@ func (dst *DeviceRadioIDentifiers) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
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|17|21|25|29|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|17|21|25|29|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
|
||||
AntennaGain int `json:"antenna_gain,omitempty"` // ^-?([0-9]|[1-9][0-9])
|
||||
AntennaID int `json:"antenna_id,omitempty"` // -1|[0-9]
|
||||
AssistedRoamingEnabled bool `json:"assisted_roaming_enabled,omitempty"`
|
||||
AssistedRoamingRssi int `json:"assisted_roaming_rssi,omitempty"` // ^-([6-7][0-9]|80)$
|
||||
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|4.5|5|16|17|21|25|29|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|17|21|25|29|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"`
|
||||
Dfs bool `json:"dfs,omitempty"`
|
||||
HardNoiseFloorEnabled bool `json:"hard_noise_floor_enabled,omitempty"`
|
||||
Ht int `json:"ht,omitempty" validate:"omitempty,oneof=20 40 80 160 240 320 1080 2160 4320"` // 20|40|80|160|240|320|1080|2160|4320
|
||||
LoadbalanceEnabled bool `json:"loadbalance_enabled,omitempty"`
|
||||
@@ -498,23 +557,24 @@ type DeviceRadioTable struct {
|
||||
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" validate:"omitempty,oneof=auto medium high low custom"` // auto|medium|high|low|custom
|
||||
TxPower string `json:"tx_power,omitempty"` // [\d]+|auto
|
||||
TxPowerMode string `json:"tx_power_mode,omitempty" validate:"omitempty,oneof=auto medium high low custom disabled"` // auto|medium|high|low|custom|disabled
|
||||
VwireEnabled bool `json:"vwire_enabled,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *DeviceRadioTable) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceRadioTable
|
||||
aux := &struct {
|
||||
AntennaGain emptyStringInt `json:"antenna_gain"`
|
||||
AntennaID emptyStringInt `json:"antenna_id"`
|
||||
BackupChannel numberOrString `json:"backup_channel"`
|
||||
Channel numberOrString `json:"channel"`
|
||||
Ht emptyStringInt `json:"ht"`
|
||||
Maxsta emptyStringInt `json:"maxsta"`
|
||||
MinRssi emptyStringInt `json:"min_rssi"`
|
||||
SensLevel emptyStringInt `json:"sens_level"`
|
||||
TxPower numberOrString `json:"tx_power"`
|
||||
AntennaGain emptyStringInt `json:"antenna_gain"`
|
||||
AntennaID emptyStringInt `json:"antenna_id"`
|
||||
AssistedRoamingRssi emptyStringInt `json:"assisted_roaming_rssi"`
|
||||
BackupChannel numberOrString `json:"backup_channel"`
|
||||
Channel numberOrString `json:"channel"`
|
||||
Ht emptyStringInt `json:"ht"`
|
||||
Maxsta emptyStringInt `json:"maxsta"`
|
||||
MinRssi emptyStringInt `json:"min_rssi"`
|
||||
SensLevel emptyStringInt `json:"sens_level"`
|
||||
TxPower numberOrString `json:"tx_power"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
@@ -527,6 +587,7 @@ func (dst *DeviceRadioTable) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
dst.AntennaGain = int(aux.AntennaGain)
|
||||
dst.AntennaID = int(aux.AntennaID)
|
||||
dst.AssistedRoamingRssi = int(aux.AssistedRoamingRssi)
|
||||
dst.BackupChannel = string(aux.BackupChannel)
|
||||
dst.Channel = string(aux.Channel)
|
||||
dst.Ht = int(aux.Ht)
|
||||
@@ -584,6 +645,34 @@ func (dst *DeviceRpsPortTable) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceSim struct {
|
||||
CardPresent bool `json:"card_present,omitempty"`
|
||||
CurrentApn DeviceCurrentApn `json:"current_apn,omitempty"`
|
||||
Iccid int `json:"iccid,omitempty"`
|
||||
Slot int `json:"slot,omitempty" validate:"omitempty,oneof=1 2"` // 1|2
|
||||
}
|
||||
|
||||
func (dst *DeviceSim) UnmarshalJSON(b []byte) error {
|
||||
type Alias DeviceSim
|
||||
aux := &struct {
|
||||
Iccid emptyStringInt `json:"iccid"`
|
||||
Slot emptyStringInt `json:"slot"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.Iccid = int(aux.Iccid)
|
||||
dst.Slot = int(aux.Slot)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *client) listDevice(ctx context.Context, site string) ([]Device, error) {
|
||||
var respBody struct {
|
||||
Meta Meta `json:"meta"`
|
||||
|
||||
16
unifi/dynamic_dns.generated.go
generated
16
unifi/dynamic_dns.generated.go
generated
@@ -25,14 +25,14 @@ type DynamicDNS struct {
|
||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||
|
||||
CustomService string `json:"custom_service,omitempty"` // ^[^"' ]+$
|
||||
HostName string `json:"host_name,omitempty"` // ^[^"' ]+$
|
||||
Interface string `json:"interface,omitempty" validate:"omitempty,oneof=wan wan2"` // wan|wan2
|
||||
Login string `json:"login,omitempty"` // ^[^"' ]+$
|
||||
Options []string `json:"options,omitempty"` // ^[^"' ]+$
|
||||
Server string `json:"server"` // ^[^"' ]+$|^$
|
||||
Service string `json:"service,omitempty" validate:"omitempty,oneof=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"` // 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"` // ^[^"' ]+$
|
||||
CustomService string `json:"custom_service,omitempty"` // ^[^"' ]+$
|
||||
HostName string `json:"host_name,omitempty"` // ^[^"' ]+$
|
||||
Interface string `json:"interface,omitempty"` // wan[2-8]?
|
||||
Login string `json:"login,omitempty"` // ^[^"' ]+$
|
||||
Options []string `json:"options,omitempty"` // ^[^"' ]+$
|
||||
Server string `json:"server"` // ^[^"' ]+$|^$
|
||||
Service string `json:"service,omitempty" validate:"omitempty,oneof=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 cloudflare custom"` // 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|cloudflare|custom
|
||||
XPassword string `json:"x_password,omitempty"` // ^[^"' ]+$
|
||||
}
|
||||
|
||||
func (dst *DynamicDNS) UnmarshalJSON(b []byte) error {
|
||||
|
||||
28
unifi/network.generated.go
generated
28
unifi/network.generated.go
generated
@@ -79,7 +79,7 @@ type Network struct {
|
||||
GatewayDevice string `json:"gateway_device" validate:"omitempty,mac"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
GatewayType string `json:"gateway_type,omitempty" validate:"omitempty,oneof=default switch"` // default|switch
|
||||
IGMPFastleave bool `json:"igmp_fastleave"`
|
||||
IGMPForwardUnknownMulticast bool `json:"igmp_forward_unknown_multicast"`
|
||||
IGMPFloodUnknownMulticast bool `json:"igmp_flood_unknown_multicast"`
|
||||
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|^$
|
||||
@@ -101,7 +101,7 @@ type Network struct {
|
||||
IPSecIkeEncryption string `json:"ipsec_ike_encryption,omitempty" validate:"omitempty,oneof=aes128 aes192 aes256 3des"` // aes128|aes192|aes256|3des
|
||||
IPSecIkeHash string `json:"ipsec_ike_hash,omitempty" validate:"omitempty,oneof=sha1 md5 sha256 sha384 sha512"` // 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" validate:"omitempty,oneof=wan wan2"` // wan|wan2
|
||||
IPSecInterface string `json:"ipsec_interface,omitempty"` // wan[2-8]?
|
||||
IPSecKeyExchange string `json:"ipsec_key_exchange,omitempty" validate:"omitempty,oneof=ikev1 ikev2"` // ikev1|ikev2
|
||||
IPSecLocalIDentifier string `json:"ipsec_local_identifier,omitempty"`
|
||||
IPSecLocalIDentifierEnabled bool `json:"ipsec_local_identifier_enabled"`
|
||||
@@ -118,8 +118,8 @@ type Network struct {
|
||||
IPV6ClientAddressAssignment string `json:"ipv6_client_address_assignment,omitempty" validate:"omitempty,oneof=slaac dhcpv6"` // slaac|dhcpv6
|
||||
IPV6InterfaceType string `json:"ipv6_interface_type,omitempty" validate:"omitempty,oneof=static pd single_network none"` // static|pd|single_network|none
|
||||
IPV6PDAutoPrefixidEnabled bool `json:"ipv6_pd_auto_prefixid_enabled"`
|
||||
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty" validate:"omitempty,oneof=wan wan2"` // wan|wan2
|
||||
IPV6PDPrefixid string `json:"ipv6_pd_prefixid"` // ^$|[a-fA-F0-9]{1,4}
|
||||
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty"` // wan[2-8]?
|
||||
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"`
|
||||
@@ -135,9 +135,9 @@ type Network struct {
|
||||
InternetAccessEnabled bool `json:"internet_access_enabled"`
|
||||
IsNAT bool `json:"is_nat"`
|
||||
L2TpAllowWeakCiphers bool `json:"l2tp_allow_weak_ciphers"`
|
||||
L2TpInterface string `json:"l2tp_interface,omitempty" validate:"omitempty,oneof=wan wan2"` // 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])$
|
||||
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan[2-8]?
|
||||
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" validate:"omitempty,mac"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||
MACOverrideEnabled bool `json:"mac_override_enabled"`
|
||||
@@ -149,7 +149,7 @@ type Network struct {
|
||||
OpenVPNConfiguration string `json:"openvpn_configuration,omitempty"`
|
||||
OpenVPNConfigurationFilename string `json:"openvpn_configuration_filename,omitempty"`
|
||||
OpenVPNEncryptionCipher string `json:"openvpn_encryption_cipher,omitempty" validate:"omitempty,oneof=AES_256_GCM AES_256_CBC BF_CBC"` // AES_256_GCM|AES_256_CBC|BF_CBC
|
||||
OpenVPNInterface string `json:"openvpn_interface,omitempty" validate:"omitempty,oneof=wan wan2"` // wan|wan2
|
||||
OpenVPNInterface string `json:"openvpn_interface,omitempty"` // wan[2-8]?
|
||||
OpenVPNLocalAddress string `json:"openvpn_local_address,omitempty" validate:"omitempty,ipv4"` // ^(([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])$
|
||||
@@ -210,6 +210,7 @@ type Network struct {
|
||||
WANDNSPreference string `json:"wan_dns_preference,omitempty" validate:"omitempty,oneof=auto manual"` // auto|manual
|
||||
WANDsliteRemoteHost string `json:"wan_dslite_remote_host,omitempty"`
|
||||
WANEgressQOS int `json:"wan_egress_qos,omitempty"` // [1-7]|^$
|
||||
WANFailoverPriority int `json:"wan_failover_priority,omitempty"` // [1-8]
|
||||
WANGateway string `json:"wan_gateway,omitempty" validate:"omitempty,ipv4"` // ^(([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" validate:"omitempty,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]))$|^$
|
||||
WANIP string `json:"wan_ip,omitempty" validate:"omitempty,ipv4"` // ^(([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])$
|
||||
@@ -221,11 +222,12 @@ type Network struct {
|
||||
WANLoadBalanceType string `json:"wan_load_balance_type,omitempty" validate:"omitempty,oneof=failover-only weighted"` // 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
|
||||
WANNetworkGroup string `json:"wan_networkgroup,omitempty"` // WAN[2-8]?|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"`
|
||||
WANSla string `json:"wan_sla,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
|
||||
@@ -242,8 +244,8 @@ type Network struct {
|
||||
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" validate:"omitempty,oneof=wan wan2"` // 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])$
|
||||
WireguardInterface string `json:"wireguard_interface,omitempty"` // wan[2-8]?
|
||||
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"`
|
||||
@@ -290,6 +292,7 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
WANDHCPCos emptyStringInt `json:"wan_dhcp_cos"`
|
||||
WANDHCPv6PDSize emptyStringInt `json:"wan_dhcpv6_pd_size"`
|
||||
WANEgressQOS emptyStringInt `json:"wan_egress_qos"`
|
||||
WANFailoverPriority emptyStringInt `json:"wan_failover_priority"`
|
||||
WANLoadBalanceWeight emptyStringInt `json:"wan_load_balance_weight"`
|
||||
WANPrefixlen emptyStringInt `json:"wan_prefixlen"`
|
||||
WANSmartqDownRate emptyStringInt `json:"wan_smartq_down_rate"`
|
||||
@@ -332,6 +335,7 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||
dst.WANDHCPCos = int(aux.WANDHCPCos)
|
||||
dst.WANDHCPv6PDSize = int(aux.WANDHCPv6PDSize)
|
||||
dst.WANEgressQOS = int(aux.WANEgressQOS)
|
||||
dst.WANFailoverPriority = int(aux.WANFailoverPriority)
|
||||
dst.WANLoadBalanceWeight = int(aux.WANLoadBalanceWeight)
|
||||
dst.WANPrefixlen = int(aux.WANPrefixlen)
|
||||
dst.WANSmartqDownRate = int(aux.WANSmartqDownRate)
|
||||
@@ -367,7 +371,7 @@ type NetworkNATOutboundIPAddresses struct {
|
||||
IPAddress string `json:"ip_address" validate:"omitempty,ipv4"` // ^(([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" validate:"omitempty,oneof=all ip_address ip_address_pool"` // all|ip_address|ip_address_pool
|
||||
WANNetworkGroup string `json:"wan_network_group,omitempty" validate:"omitempty,oneof=WAN WAN2"` // WAN|WAN2
|
||||
WANNetworkGroup string `json:"wan_network_group,omitempty"` // WAN[2-8]?
|
||||
}
|
||||
|
||||
func (dst *NetworkNATOutboundIPAddresses) UnmarshalJSON(b []byte) error {
|
||||
|
||||
12
unifi/port_forward.generated.go
generated
12
unifi/port_forward.generated.go
generated
@@ -32,10 +32,10 @@ type PortForward struct {
|
||||
Fwd string `json:"fwd,omitempty" validate:"omitempty,ipv4"` // ^(([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])$
|
||||
FwdPort string `json:"fwd_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])|([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])-([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]))+(,([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])|,([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])-([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])){0,14}
|
||||
Log bool `json:"log"`
|
||||
Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=128"` // .{1,128}
|
||||
PfwdInterface string `json:"pfwd_interface,omitempty" validate:"omitempty,oneof=wan wan2 both all"` // wan|wan2|both|all
|
||||
Proto string `json:"proto,omitempty" validate:"omitempty,oneof=tcp_udp tcp udp"` // tcp_udp|tcp|udp
|
||||
Src string `json:"src,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])$|^(([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-2][0-9]|3[0-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])$|^!(([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])/([0-9]|[1-2][0-9]|3[0-2])$|^any$
|
||||
Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=128"` // .{1,128}
|
||||
PfwdInterface string `json:"pfwd_interface,omitempty"` // wan[2-8]?|both|all
|
||||
Proto string `json:"proto,omitempty" validate:"omitempty,oneof=tcp_udp tcp udp"` // tcp_udp|tcp|udp
|
||||
Src string `json:"src,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])$|^(([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-2][0-9]|3[0-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])$|^!(([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])/([0-9]|[1-2][0-9]|3[0-2])$|^any$
|
||||
SrcFirewallGroupID string `json:"src_firewall_group_id"`
|
||||
SrcLimitingEnabled bool `json:"src_limiting_enabled"`
|
||||
SrcLimitingType string `json:"src_limiting_type,omitempty" validate:"omitempty,oneof=ip firewall_group"` // ip|firewall_group
|
||||
@@ -58,8 +58,8 @@ func (dst *PortForward) UnmarshalJSON(b []byte) error {
|
||||
}
|
||||
|
||||
type PortForwardDestinationIPs struct {
|
||||
DestinationIP string `json:"destination_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])$|^any$
|
||||
Interface string `json:"interface,omitempty" validate:"omitempty,oneof=wan wan2"` // wan|wan2
|
||||
DestinationIP string `json:"destination_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])$|^any$
|
||||
Interface string `json:"interface,omitempty"` // wan[2-8]?
|
||||
}
|
||||
|
||||
func (dst *PortForwardDestinationIPs) UnmarshalJSON(b []byte) error {
|
||||
|
||||
2
unifi/routing.generated.go
generated
2
unifi/routing.generated.go
generated
@@ -30,7 +30,7 @@ type Routing struct {
|
||||
GatewayType string `json:"gateway_type,omitempty" validate:"omitempty,oneof=default switch"` // default|switch
|
||||
Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=128"` // .{1,128}
|
||||
StaticRouteDistance int `json:"static-route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||
StaticRouteInterface string `json:"static-route_interface"` // WAN1|WAN2|[\d\w]+|^$
|
||||
StaticRouteInterface string `json:"static-route_interface"` // WAN[1-8]?|[\d\w]+|^$
|
||||
StaticRouteNetwork string `json:"static-route_network,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])$|^([a-fA-F0-9:]+\/(([1-9]|[1-8][0-9]|9[0-9]|1[01][0-9]|12[0-8])))$
|
||||
StaticRouteNexthop string `json:"static-route_nexthop"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^([a-fA-F0-9:]+)$|^$
|
||||
StaticRouteType string `json:"static-route_type,omitempty" validate:"omitempty,oneof=nexthop-route interface-route blackhole"` // nexthop-route|interface-route|blackhole
|
||||
|
||||
2
unifi/setting_dashboard.generated.go
generated
2
unifi/setting_dashboard.generated.go
generated
@@ -51,7 +51,7 @@ func (dst *SettingDashboard) UnmarshalJSON(b []byte) error {
|
||||
|
||||
type SettingDashboardWidgets struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
Name string `json:"name,omitempty" validate:"omitempty,oneof=cybersecure traffic_identification wifi_technology wifi_channels wifi_client_experience wifi_tx_retries most_active_apps_aps_clients most_active_apps_clients most_active_aps_clients most_active_apps_aps most_active_apps v2_most_active_aps v2_most_active_clients wifi_connectivity ap_radio_density"` // cybersecure|traffic_identification|wifi_technology|wifi_channels|wifi_client_experience|wifi_tx_retries|most_active_apps_aps_clients|most_active_apps_clients|most_active_aps_clients|most_active_apps_aps|most_active_apps|v2_most_active_aps|v2_most_active_clients|wifi_connectivity|ap_radio_density
|
||||
Name string `json:"name,omitempty" validate:"omitempty,oneof=critical_traffic_prioritization cybersecure traffic_identification wifi_technology wifi_channels wifi_client_experience wifi_tx_retries most_active_apps_aps_clients most_active_apps_clients most_active_aps_clients most_active_apps_aps most_active_apps v2_most_active_aps v2_most_active_clients wifi_connectivity ap_radio_density wifi_channel_preset_configuration"` // critical_traffic_prioritization|cybersecure|traffic_identification|wifi_technology|wifi_channels|wifi_client_experience|wifi_tx_retries|most_active_apps_aps_clients|most_active_apps_clients|most_active_aps_clients|most_active_apps_aps|most_active_apps|v2_most_active_aps|v2_most_active_clients|wifi_connectivity|ap_radio_density|wifi_channel_preset_configuration
|
||||
}
|
||||
|
||||
func (dst *SettingDashboardWidgets) UnmarshalJSON(b []byte) error {
|
||||
|
||||
22
unifi/setting_global_switch.generated.go
generated
22
unifi/setting_global_switch.generated.go
generated
@@ -29,16 +29,18 @@ type SettingGlobalSwitch struct {
|
||||
|
||||
Key string `json:"key"`
|
||||
|
||||
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" validate:"omitempty,oneof=stp rstp disabled"` // stp|rstp|disabled
|
||||
SwitchExclusions []string `json:"switch_exclusions,omitempty" validate:"omitempty,mac"` // ^([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"`
|
||||
FloodKnownProtocols bool `json:"flood_known_protocols"`
|
||||
FlowctrlEnabled bool `json:"flowctrl_enabled"`
|
||||
ForwardUnknownMcastRouterPorts bool `json:"forward_unknown_mcast_router_ports"`
|
||||
JumboframeEnabled bool `json:"jumboframe_enabled"`
|
||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||
StpVersion string `json:"stp_version,omitempty" validate:"omitempty,oneof=stp rstp disabled"` // stp|rstp|disabled
|
||||
SwitchExclusions []string `json:"switch_exclusions,omitempty" validate:"omitempty,mac"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||
}
|
||||
|
||||
func (dst *SettingGlobalSwitch) UnmarshalJSON(b []byte) error {
|
||||
|
||||
114
unifi/setting_mdns.generated.go
generated
Normal file
114
unifi/setting_mdns.generated.go
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
// 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
|
||||
)
|
||||
|
||||
const SettingMdnsKey = "mdns"
|
||||
|
||||
type SettingMdns 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"`
|
||||
|
||||
CustomServices []SettingMdnsCustomServices `json:"custom_services,omitempty"`
|
||||
Mode string `json:"mode,omitempty" validate:"omitempty,oneof=all auto custom"` // all|auto|custom
|
||||
PredefinedServices []SettingMdnsPredefinedServices `json:"predefined_services,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingMdns) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingMdns
|
||||
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 SettingMdnsCustomServices struct {
|
||||
Address string `json:"address,omitempty"` // ^_[a-zA-Z0-9._-]+\._(tcp|udp)(\.local)?$
|
||||
Name string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (dst *SettingMdnsCustomServices) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingMdnsCustomServices
|
||||
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 SettingMdnsPredefinedServices struct {
|
||||
Code string `json:"code,omitempty" validate:"omitempty,oneof=amazon_devices android_tv_remote apple_airDrop apple_airPlay apple_file_sharing apple_iChat apple_iTunes aqara bose dns_service_discovery ftp_servers google_chromecast homeKit matter_network philips_hue printers roku scanners sonos spotify_connect ssh_servers time_capsule web_servers windows_file_sharing_samba"` // amazon_devices|android_tv_remote|apple_airDrop|apple_airPlay|apple_file_sharing|apple_iChat|apple_iTunes|aqara|bose|dns_service_discovery|ftp_servers|google_chromecast|homeKit|matter_network|philips_hue|printers|roku|scanners|sonos|spotify_connect|ssh_servers|time_capsule|web_servers|windows_file_sharing_samba
|
||||
}
|
||||
|
||||
func (dst *SettingMdnsPredefinedServices) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingMdnsPredefinedServices
|
||||
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
|
||||
}
|
||||
|
||||
// GetSettingMdns Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) GetSettingMdns(ctx context.Context, site string) (*SettingMdns, error) {
|
||||
s, f, err := c.GetSetting(ctx, site, SettingMdnsKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if s.Key != SettingMdnsKey {
|
||||
return nil, fmt.Errorf("unexpected setting key received. Requested: %q, received: %q", SettingMdnsKey, s.Key)
|
||||
}
|
||||
return f.(*SettingMdns), nil
|
||||
}
|
||||
|
||||
// UpdateSettingMdns Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) UpdateSettingMdns(ctx context.Context, site string, s *SettingMdns) (*SettingMdns, error) {
|
||||
s.Key = SettingMdnsKey
|
||||
result, err := c.SetSetting(ctx, site, SettingMdnsKey, s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*SettingMdns), nil
|
||||
}
|
||||
57
unifi/setting_radio_ai.generated.go
generated
57
unifi/setting_radio_ai.generated.go
generated
@@ -29,21 +29,23 @@ 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
|
||||
ChannelsBlacklist []SettingRadioAiChannelsBlacklist `json:"channels_blacklist,omitempty"`
|
||||
ChannelsNa []int `json:"channels_na,omitempty" validate:"omitempty,oneof=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"` // 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" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 10 11 12 13 14"` // 1|2|3|4|5|6|7|8|9|10|11|12|13|14
|
||||
CronExpr string `json:"cron_expr,omitempty"`
|
||||
Default bool `json:"default"`
|
||||
Enabled bool `json:"enabled"`
|
||||
ExcludeDevices []string `json:"exclude_devices,omitempty"` // ([0-9a-z]{2}:){5}[0-9a-z]{2}
|
||||
HtModesNa []int `json:"ht_modes_na,omitempty" validate:"omitempty,oneof=20 40 80 160"` // ^(20|40|80|160)$
|
||||
HtModesNg []int `json:"ht_modes_ng,omitempty" validate:"omitempty,oneof=20 40"` // ^(20|40)$
|
||||
Optimize []string `json:"optimize,omitempty" validate:"omitempty,oneof=channel power"` // channel|power
|
||||
Radios []string `json:"radios,omitempty" validate:"omitempty,oneof=na ng"` // na|ng
|
||||
SettingPreference string `json:"setting_preference,omitempty" validate:"omitempty,oneof=auto manual"` // auto|manual
|
||||
UseXy bool `json:"useXY"`
|
||||
AutoAdjustChannelsToCountry bool `json:"auto_adjust_channels_to_country"`
|
||||
AutoChannelPresetsType string `json:"auto_channel_presets_type,omitempty" validate:"omitempty,oneof=maximum_speed conservative custom"` // maximum_speed|conservative|custom
|
||||
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
|
||||
ChannelsBlacklist []SettingRadioAiChannelsBlacklist `json:"channels_blacklist,omitempty"`
|
||||
ChannelsNa []int `json:"channels_na,omitempty" validate:"omitempty,oneof=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"` // 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" validate:"omitempty,oneof=1 2 3 4 5 6 7 8 9 10 11 12 13 14"` // 1|2|3|4|5|6|7|8|9|10|11|12|13|14
|
||||
CronExpr string `json:"cron_expr,omitempty"`
|
||||
Default bool `json:"default"`
|
||||
Enabled bool `json:"enabled"`
|
||||
ExcludeDevices []string `json:"exclude_devices,omitempty"` // ([0-9a-z]{2}:){5}[0-9a-z]{2}
|
||||
HtModesNa []int `json:"ht_modes_na,omitempty" validate:"omitempty,oneof=20 40 80 160"` // ^(20|40|80|160)$
|
||||
HtModesNg []int `json:"ht_modes_ng,omitempty" validate:"omitempty,oneof=20 40"` // ^(20|40)$
|
||||
Optimize []string `json:"optimize,omitempty" validate:"omitempty,oneof=channel power"` // channel|power
|
||||
Radios []string `json:"radios,omitempty" validate:"omitempty,oneof=na ng"` // na|ng
|
||||
RadiosConfiguration []SettingRadioAiRadiosConfiguration `json:"radios_configuration,omitempty"`
|
||||
SettingPreference string `json:"setting_preference,omitempty" validate:"omitempty,oneof=auto manual"` // auto|manual
|
||||
UseXy bool `json:"useXY"`
|
||||
}
|
||||
|
||||
func (dst *SettingRadioAi) UnmarshalJSON(b []byte) error {
|
||||
@@ -115,6 +117,31 @@ func (dst *SettingRadioAiChannelsBlacklist) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SettingRadioAiRadiosConfiguration struct {
|
||||
ChannelWidth int `json:"channel_width,omitempty" validate:"omitempty,oneof=20 40 80 160 320"` // 20|40|80|160|320
|
||||
Dfs bool `json:"dfs"`
|
||||
Radio string `json:"radio,omitempty" validate:"omitempty,oneof=na ng 6e"` // na|ng|6e
|
||||
}
|
||||
|
||||
func (dst *SettingRadioAiRadiosConfiguration) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingRadioAiRadiosConfiguration
|
||||
aux := &struct {
|
||||
ChannelWidth emptyStringInt `json:"channel_width"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.ChannelWidth = int(aux.ChannelWidth)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSettingRadioAi Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) GetSettingRadioAi(ctx context.Context, site string) (*SettingRadioAi, error) {
|
||||
s, f, err := c.GetSetting(ctx, site, SettingRadioAiKey)
|
||||
|
||||
75
unifi/setting_roaming_assistant.generated.go
generated
Normal file
75
unifi/setting_roaming_assistant.generated.go
generated
Normal file
@@ -0,0 +1,75 @@
|
||||
// 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
|
||||
)
|
||||
|
||||
const SettingRoamingAssistantKey = "roaming_assistant"
|
||||
|
||||
type SettingRoamingAssistant 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"`
|
||||
|
||||
Enabled bool `json:"enabled"`
|
||||
Rssi int `json:"rssi,omitempty"` // ^-([6-7][0-9]|80)$
|
||||
}
|
||||
|
||||
func (dst *SettingRoamingAssistant) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingRoamingAssistant
|
||||
aux := &struct {
|
||||
Rssi emptyStringInt `json:"rssi"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(dst),
|
||||
}
|
||||
|
||||
err := json.Unmarshal(b, &aux)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to unmarshal alias: %w", err)
|
||||
}
|
||||
dst.Rssi = int(aux.Rssi)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSettingRoamingAssistant Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) GetSettingRoamingAssistant(ctx context.Context, site string) (*SettingRoamingAssistant, error) {
|
||||
s, f, err := c.GetSetting(ctx, site, SettingRoamingAssistantKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if s.Key != SettingRoamingAssistantKey {
|
||||
return nil, fmt.Errorf("unexpected setting key received. Requested: %q, received: %q", SettingRoamingAssistantKey, s.Key)
|
||||
}
|
||||
return f.(*SettingRoamingAssistant), nil
|
||||
}
|
||||
|
||||
// UpdateSettingRoamingAssistant Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) UpdateSettingRoamingAssistant(ctx context.Context, site string, s *SettingRoamingAssistant) (*SettingRoamingAssistant, error) {
|
||||
s.Key = SettingRoamingAssistantKey
|
||||
result, err := c.SetSetting(ctx, site, SettingRoamingAssistantKey, s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*SettingRoamingAssistant), nil
|
||||
}
|
||||
5
unifi/setting_super_mgmt.generated.go
generated
5
unifi/setting_super_mgmt.generated.go
generated
@@ -38,10 +38,7 @@ type SettingSuperMgmt struct {
|
||||
AutobackupGcsCertificatePath string `json:"autobackup_gcs_certificate_path,omitempty"`
|
||||
AutobackupLocalPath string `json:"autobackup_local_path,omitempty"`
|
||||
AutobackupMaxFiles int `json:"autobackup_max_files,omitempty"`
|
||||
AutobackupPostActions []string `json:"autobackup_post_actions,omitempty" validate:"omitempty,oneof=copy_local copy_s3 copy_gcs copy_cloud"` // copy_local|copy_s3|copy_gcs|copy_cloud
|
||||
AutobackupS3AccessKey string `json:"autobackup_s3_access_key,omitempty"`
|
||||
AutobackupS3AccessSecret string `json:"autobackup_s3_access_secret,omitempty"`
|
||||
AutobackupS3Bucket string `json:"autobackup_s3_bucket,omitempty"`
|
||||
AutobackupPostActions []string `json:"autobackup_post_actions,omitempty" validate:"omitempty,oneof=copy_local copy_gcs copy_cloud"` // copy_local|copy_gcs|copy_cloud
|
||||
AutobackupTimezone string `json:"autobackup_timezone,omitempty"`
|
||||
BackupToCloudEnabled bool `json:"backup_to_cloud_enabled"`
|
||||
ContactInfoCity string `json:"contact_info_city,omitempty"`
|
||||
|
||||
74
unifi/setting_traffic_flow.generated.go
generated
Normal file
74
unifi/setting_traffic_flow.generated.go
generated
Normal file
@@ -0,0 +1,74 @@
|
||||
// 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
|
||||
)
|
||||
|
||||
const SettingTrafficFlowKey = "traffic_flow"
|
||||
|
||||
type SettingTrafficFlow 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"`
|
||||
|
||||
EnabledAllowedTraffic bool `json:"enabled_allowed_traffic"`
|
||||
GatewayDNSEnabled bool `json:"gateway_dns_enabled"`
|
||||
UnifiDeviceManagementEnabled bool `json:"unifi_device_management_enabled"`
|
||||
UnifiServicesEnabled bool `json:"unifi_services_enabled"`
|
||||
}
|
||||
|
||||
func (dst *SettingTrafficFlow) UnmarshalJSON(b []byte) error {
|
||||
type Alias SettingTrafficFlow
|
||||
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
|
||||
}
|
||||
|
||||
// GetSettingTrafficFlow Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) GetSettingTrafficFlow(ctx context.Context, site string) (*SettingTrafficFlow, error) {
|
||||
s, f, err := c.GetSetting(ctx, site, SettingTrafficFlowKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if s.Key != SettingTrafficFlowKey {
|
||||
return nil, fmt.Errorf("unexpected setting key received. Requested: %q, received: %q", SettingTrafficFlowKey, s.Key)
|
||||
}
|
||||
return f.(*SettingTrafficFlow), nil
|
||||
}
|
||||
|
||||
// UpdateSettingTrafficFlow Experimental! This function is not yet stable and may change in the future.
|
||||
func (c *client) UpdateSettingTrafficFlow(ctx context.Context, site string, s *SettingTrafficFlow) (*SettingTrafficFlow, error) {
|
||||
s.Key = SettingTrafficFlowKey
|
||||
result, err := c.SetSetting(ctx, site, SettingTrafficFlowKey, s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result.(*SettingTrafficFlow), nil
|
||||
}
|
||||
2
unifi/setting_usg.generated.go
generated
2
unifi/setting_usg.generated.go
generated
@@ -83,7 +83,7 @@ type SettingUsg struct {
|
||||
UpnpEnabled bool `json:"upnp_enabled"`
|
||||
UpnpNATPmpEnabled bool `json:"upnp_nat_pmp_enabled"`
|
||||
UpnpSecureMode bool `json:"upnp_secure_mode"`
|
||||
UpnpWANInterface string `json:"upnp_wan_interface,omitempty" validate:"omitempty,oneof=WAN WAN2"` // WAN|WAN2
|
||||
UpnpWANInterface string `json:"upnp_wan_interface,omitempty"` // WAN[2-8]?
|
||||
}
|
||||
|
||||
func (dst *SettingUsg) UnmarshalJSON(b []byte) error {
|
||||
|
||||
2
unifi/version.generated.go
generated
2
unifi/version.generated.go
generated
@@ -2,4 +2,4 @@
|
||||
|
||||
package unifi
|
||||
|
||||
const UnifiVersion = "9.0.114"
|
||||
const UnifiVersion = "9.2.87"
|
||||
|
||||
Reference in New Issue
Block a user