[create-pull-request] automated change (#143)
Co-authored-by: joshuaspence <joshuaspence@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
aed72d864b
commit
f3077d3b3c
77
unifi/device.generated.go
generated
77
unifi/device.generated.go
generated
@@ -51,8 +51,7 @@ type Device struct {
|
|||||||
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
|
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
|
||||||
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
||||||
LcmNightModeBegins string `json:"lcm_night_mode_begins,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
LcmNightModeBegins string `json:"lcm_night_mode_begins,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
||||||
LcmNightModeEnabled bool `json:"lcm_night_mode_enabled,omitempty"`
|
LcmNightModeEnds string `json:"lcm_night_mode_ends,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
||||||
LcmNightModeEnds string `json:"lcm_night_mode_ends,omitempty"` // (^$)|(^(0[1-9])|(1[0-9])|(2[0-3])):([0-5][0-9]$)
|
|
||||||
LcmSettingsRestrictedAccess bool `json:"lcm_settings_restricted_access,omitempty"`
|
LcmSettingsRestrictedAccess bool `json:"lcm_settings_restricted_access,omitempty"`
|
||||||
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
||||||
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
||||||
@@ -238,40 +237,46 @@ func (dst *DeviceOutletOverrides) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DevicePortOverrides struct {
|
type DevicePortOverrides struct {
|
||||||
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-8]
|
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-8]
|
||||||
Autoneg bool `json:"autoneg,omitempty"`
|
Autoneg bool `json:"autoneg,omitempty"`
|
||||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
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]
|
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}
|
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"`
|
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled,omitempty"`
|
||||||
FullDuplex bool `json:"full_duplex,omitempty"`
|
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||||
Isolation bool `json:"isolation,omitempty"`
|
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||||
LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
|
FullDuplex bool `json:"full_duplex,omitempty"`
|
||||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled,omitempty"`
|
Isolation bool `json:"isolation,omitempty"`
|
||||||
MirrorPortIDX int `json:"mirror_port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{0,128}
|
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled,omitempty"`
|
||||||
OpMode string `json:"op_mode,omitempty"` // switch|mirror|aggregate
|
MirrorPortIDX int `json:"mirror_port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||||
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
NATiveNetworkID string `json:"native_networkconf_id,omitempty"`
|
||||||
PortIDX int `json:"port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
Name string `json:"name,omitempty"` // .{0,128}
|
||||||
PortProfileID string `json:"portconf_id,omitempty"` // [\d\w]+
|
OpMode string `json:"op_mode,omitempty"` // switch|mirror|aggregate
|
||||||
PortSecurityEnabled bool `json:"port_security_enabled,omitempty"`
|
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
||||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
PortIDX int `json:"port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
|
||||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PortProfileID string `json:"portconf_id,omitempty"` // [\d\w]+
|
||||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PortSecurityEnabled bool `json:"port_security_enabled,omitempty"`
|
||||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled,omitempty"`
|
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PriorityQueue4Level int `json:"priority_queue4_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
|
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled,omitempty"`
|
ShowTrafficRestrictionAsAllowlist bool `json:"show_traffic_restriction_as_allowlist,omitempty"`
|
||||||
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||||
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
|
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled,omitempty"`
|
||||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled,omitempty"`
|
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
|
||||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled,omitempty"`
|
||||||
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
|
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StpPortMode bool `json:"stp_port_mode,omitempty"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
func (dst *DevicePortOverrides) UnmarshalJSON(b []byte) error {
|
||||||
|
|||||||
84
unifi/network.generated.go
generated
84
unifi/network.generated.go
generated
@@ -26,7 +26,6 @@ type Network struct {
|
|||||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||||
|
|
||||||
AutoScaleEnabled bool `json:"auto_scale_enabled"`
|
AutoScaleEnabled bool `json:"auto_scale_enabled"`
|
||||||
ClientMACList []string `json:"client_mac_list,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
|
||||||
DHCPDBootEnabled bool `json:"dhcpd_boot_enabled"`
|
DHCPDBootEnabled bool `json:"dhcpd_boot_enabled"`
|
||||||
DHCPDBootFilename string `json:"dhcpd_boot_filename,omitempty"` // .{1,256}
|
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}|^$
|
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}|^$
|
||||||
@@ -80,13 +79,15 @@ type Network struct {
|
|||||||
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|^$
|
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]|^$
|
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|^$
|
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|^$
|
||||||
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])$|^$
|
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"`
|
IGMPSnooping bool `json:"igmp_snooping"`
|
||||||
IGMPSupression bool `json:"igmp_supression"`
|
IGMPSupression bool `json:"igmp_supression"`
|
||||||
IPSecDhGroup int `json:"ipsec_dh_group,omitempty"` // 2|5|14|15|16|19|20|21|25|26
|
IPSecDhGroup int `json:"ipsec_dh_group,omitempty"` // 2|5|14|15|16|19|20|21|25|26
|
||||||
IPSecDynamicRouting bool `json:"ipsec_dynamic_routing"`
|
IPSecDynamicRouting bool `json:"ipsec_dynamic_routing"`
|
||||||
IPSecEncryption string `json:"ipsec_encryption,omitempty"` // aes128|aes192|aes256|3des
|
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
|
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
|
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
|
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
|
IPSecInterface string `json:"ipsec_interface,omitempty"` // wan|wan2
|
||||||
@@ -107,8 +108,6 @@ type Network struct {
|
|||||||
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)$|^$
|
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"`
|
IPV6Subnet string `json:"ipv6_subnet,omitempty"`
|
||||||
InternetAccessEnabled bool `json:"internet_access_enabled"`
|
InternetAccessEnabled bool `json:"internet_access_enabled"`
|
||||||
IntraNetworkAccessEnabled bool `json:"intra_network_access_enabled"`
|
|
||||||
IntraNetworks []string `json:"intra_networks,omitempty"` // [\d\w]+
|
|
||||||
IsNAT bool `json:"is_nat"`
|
IsNAT bool `json:"is_nat"`
|
||||||
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
|
||||||
@@ -121,10 +120,13 @@ type Network struct {
|
|||||||
NATOutboundIPAddresses []NetworkNATOutboundIPAddresses `json:"nat_outbound_ip_addresses,omitempty"`
|
NATOutboundIPAddresses []NetworkNATOutboundIPAddresses `json:"nat_outbound_ip_addresses,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?
|
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?
|
||||||
|
NetworkIsolationEnabled bool `json:"network_isolation_enabled"`
|
||||||
OpenVPNConfiguration string `json:"openvpn_configuration,omitempty"`
|
OpenVPNConfiguration string `json:"openvpn_configuration,omitempty"`
|
||||||
OpenVPNConfigurationFilename string `json:"openvpn_configuration_filename,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])$
|
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])$
|
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
|
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])$
|
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])$
|
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])$
|
||||||
@@ -150,10 +152,12 @@ 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|wireguard-server
|
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)$
|
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)$
|
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]
|
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"`
|
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])$|^$
|
||||||
@@ -184,45 +188,53 @@ type Network struct {
|
|||||||
WireguardInterface string `json:"wireguard_interface,omitempty"` // wan|wan2
|
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])$
|
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"`
|
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"` // [^\"\' ]+
|
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"` // [^"' ]+
|
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"`
|
XWireguardPrivateKey string `json:"x_wireguard_private_key,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *Network) UnmarshalJSON(b []byte) error {
|
func (dst *Network) UnmarshalJSON(b []byte) error {
|
||||||
type Alias Network
|
type Alias Network
|
||||||
aux := &struct {
|
aux := &struct {
|
||||||
DHCPDLeaseTime emptyStringInt `json:"dhcpd_leasetime"`
|
DHCPDLeaseTime emptyStringInt `json:"dhcpd_leasetime"`
|
||||||
DHCPDTimeOffset emptyStringInt `json:"dhcpd_time_offset"`
|
DHCPDTimeOffset emptyStringInt `json:"dhcpd_time_offset"`
|
||||||
DHCPDV6LeaseTime emptyStringInt `json:"dhcpdv6_leasetime"`
|
DHCPDV6LeaseTime emptyStringInt `json:"dhcpdv6_leasetime"`
|
||||||
IGMPGroupmembership emptyStringInt `json:"igmp_groupmembership"`
|
IGMPGroupmembership emptyStringInt `json:"igmp_groupmembership"`
|
||||||
IGMPMaxresponse emptyStringInt `json:"igmp_maxresponse"`
|
IGMPMaxresponse emptyStringInt `json:"igmp_maxresponse"`
|
||||||
IGMPMcrtrexpiretime emptyStringInt `json:"igmp_mcrtrexpiretime"`
|
IGMPMcrtrexpiretime emptyStringInt `json:"igmp_mcrtrexpiretime"`
|
||||||
IPSecDhGroup emptyStringInt `json:"ipsec_dh_group"`
|
IPSecDhGroup emptyStringInt `json:"ipsec_dh_group"`
|
||||||
IPSecEspDhGroup emptyStringInt `json:"ipsec_esp_dh_group"`
|
IPSecEspDhGroup emptyStringInt `json:"ipsec_esp_dh_group"`
|
||||||
IPSecIkeDhGroup emptyStringInt `json:"ipsec_ike_dh_group"`
|
IPSecIkeDhGroup emptyStringInt `json:"ipsec_ike_dh_group"`
|
||||||
IPV6RaPreferredLifetime emptyStringInt `json:"ipv6_ra_preferred_lifetime"`
|
IPV6RaPreferredLifetime emptyStringInt `json:"ipv6_ra_preferred_lifetime"`
|
||||||
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"`
|
LocalPort emptyStringInt `json:"local_port"`
|
||||||
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"`
|
||||||
VrrpVrid emptyStringInt `json:"vrrp_vrid"`
|
WANDHCPCos emptyStringInt `json:"wan_dhcp_cos"`
|
||||||
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"`
|
||||||
WANPrefixlen emptyStringInt `json:"wan_prefixlen"`
|
WANPrefixlen emptyStringInt `json:"wan_prefixlen"`
|
||||||
WANSmartqDownRate emptyStringInt `json:"wan_smartq_down_rate"`
|
WANSmartqDownRate emptyStringInt `json:"wan_smartq_down_rate"`
|
||||||
WANSmartqUpRate emptyStringInt `json:"wan_smartq_up_rate"`
|
WANSmartqUpRate emptyStringInt `json:"wan_smartq_up_rate"`
|
||||||
WANVLAN emptyStringInt `json:"wan_vlan"`
|
WANVLAN emptyStringInt `json:"wan_vlan"`
|
||||||
|
|
||||||
*Alias
|
*Alias
|
||||||
}{
|
}{
|
||||||
@@ -245,7 +257,6 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
|||||||
dst.IPV6RaPreferredLifetime = int(aux.IPV6RaPreferredLifetime)
|
dst.IPV6RaPreferredLifetime = int(aux.IPV6RaPreferredLifetime)
|
||||||
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.LocalPort = int(aux.LocalPort)
|
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)
|
||||||
@@ -254,6 +265,7 @@ func (dst *Network) UnmarshalJSON(b []byte) error {
|
|||||||
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.VrrpVrid = int(aux.VrrpVrid)
|
||||||
|
dst.WANDHCPCos = int(aux.WANDHCPCos)
|
||||||
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)
|
||||||
|
|||||||
71
unifi/port_profile.generated.go
generated
71
unifi/port_profile.generated.go
generated
@@ -25,41 +25,42 @@ type PortProfile struct {
|
|||||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||||
|
|
||||||
Autoneg bool `json:"autoneg"`
|
Autoneg bool `json:"autoneg"`
|
||||||
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
|
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]
|
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}
|
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"`
|
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled"`
|
||||||
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
ExcludedNetworkIDs []string `json:"excluded_networkconf_ids,omitempty"`
|
||||||
FullDuplex bool `json:"full_duplex"`
|
Forward string `json:"forward,omitempty"` // all|native|customize|disabled
|
||||||
Isolation bool `json:"isolation"`
|
FullDuplex bool `json:"full_duplex"`
|
||||||
LldpmedEnabled bool `json:"lldpmed_enabled"`
|
Isolation bool `json:"isolation"`
|
||||||
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled"`
|
LldpmedEnabled bool `json:"lldpmed_enabled"`
|
||||||
NATiveNetworkID string `json:"native_networkconf_id"`
|
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled"`
|
||||||
Name string `json:"name,omitempty"`
|
NATiveNetworkID string `json:"native_networkconf_id"`
|
||||||
OpMode string `json:"op_mode,omitempty"` // switch
|
Name string `json:"name,omitempty"`
|
||||||
PoeMode string `json:"poe_mode,omitempty"` // auto|pasv24|passthrough|off
|
OpMode string `json:"op_mode,omitempty"` // switch
|
||||||
PortSecurityEnabled bool `json:"port_security_enabled"`
|
PoeMode string `json:"poe_mode,omitempty"` // auto|off
|
||||||
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
PortSecurityEnabled bool `json:"port_security_enabled"`
|
||||||
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PortSecurityMACAddress []string `json:"port_security_mac_address,omitempty"` // ^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$
|
||||||
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PriorityQueue1Level int `json:"priority_queue1_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PriorityQueue2Level int `json:"priority_queue2_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
PriorityQueue3Level int `json:"priority_queue3_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
PriorityQueue4Level int `json:"priority_queue4_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
||||||
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled"`
|
ShowTrafficRestrictionAsAllowlist bool `json:"show_traffic_restriction_as_allowlist"`
|
||||||
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
Speed int `json:"speed,omitempty"` // 10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000
|
||||||
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
|
StormctrlBroadcastastEnabled bool `json:"stormctrl_bcast_enabled"`
|
||||||
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled"`
|
StormctrlBroadcastastLevel int `json:"stormctrl_bcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StormctrlMcastLevel int `json:"stormctrl_mcast_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
|
||||||
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
|
StormctrlMcastEnabled bool `json:"stormctrl_mcast_enabled"`
|
||||||
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
StormctrlMcastLevel int `json:"stormctrl_mcast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled"`
|
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
|
||||||
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
StormctrlType string `json:"stormctrl_type,omitempty"` // level|rate
|
||||||
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
|
StormctrlUcastEnabled bool `json:"stormctrl_ucast_enabled"`
|
||||||
StpPortMode bool `json:"stp_port_mode"`
|
StormctrlUcastLevel int `json:"stormctrl_ucast_level,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
TaggedNetworkIDs []string `json:"tagged_networkconf_ids,omitempty"`
|
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
|
||||||
VoiceNetworkID string `json:"voice_networkconf_id"`
|
StpPortMode bool `json:"stp_port_mode"`
|
||||||
|
VoiceNetworkID string `json:"voice_networkconf_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *PortProfile) UnmarshalJSON(b []byte) error {
|
func (dst *PortProfile) UnmarshalJSON(b []byte) error {
|
||||||
|
|||||||
15
unifi/schedule_task.generated.go
generated
15
unifi/schedule_task.generated.go
generated
@@ -25,16 +25,11 @@ type ScheduleTask struct {
|
|||||||
NoDelete bool `json:"attr_no_delete,omitempty"`
|
NoDelete bool `json:"attr_no_delete,omitempty"`
|
||||||
NoEdit bool `json:"attr_no_edit,omitempty"`
|
NoEdit bool `json:"attr_no_edit,omitempty"`
|
||||||
|
|
||||||
Action string `json:"action,omitempty"` // stream|upgrade
|
Action string `json:"action,omitempty"` // upgrade
|
||||||
AdditionalSoundsEnabled bool `json:"additional_sounds_enabled"`
|
CronExpr string `json:"cron_expr,omitempty"`
|
||||||
BroadcastgroupID string `json:"broadcastgroup_id"`
|
ExecuteOnlyOnce bool `json:"execute_only_once"`
|
||||||
CronExpr string `json:"cron_expr,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
ExecuteOnlyOnce bool `json:"execute_only_once"`
|
UpgradeTargets []ScheduleTaskUpgradeTargets `json:"upgrade_targets,omitempty"`
|
||||||
MediafileID string `json:"mediafile_id"`
|
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
SampleFilename string `json:"sample_filename,omitempty"`
|
|
||||||
StreamType string `json:"stream_type,omitempty"` // media|sample
|
|
||||||
UpgradeTargets []ScheduleTaskUpgradeTargets `json:"upgrade_targets,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *ScheduleTask) UnmarshalJSON(b []byte) error {
|
func (dst *ScheduleTask) UnmarshalJSON(b []byte) error {
|
||||||
|
|||||||
41
unifi/setting_guest_access.generated.go
generated
41
unifi/setting_guest_access.generated.go
generated
@@ -29,8 +29,7 @@ type SettingGuestAccess struct {
|
|||||||
|
|
||||||
AllowedSubnet string `json:"allowed_subnet_,omitempty"`
|
AllowedSubnet string `json:"allowed_subnet_,omitempty"`
|
||||||
Auth string `json:"auth,omitempty"` // none|hotspot|facebook_wifi|custom
|
Auth string `json:"auth,omitempty"` // none|hotspot|facebook_wifi|custom
|
||||||
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])$|^$
|
||||||
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"`
|
EcEnabled bool `json:"ec_enabled"`
|
||||||
Expire string `json:"expire,omitempty"` // [\d]+|custom
|
Expire string `json:"expire,omitempty"` // [\d]+|custom
|
||||||
ExpireNumber int `json:"expire_number,omitempty"` // ^[1-9][0-9]{0,5}|1000000$
|
ExpireNumber int `json:"expire_number,omitempty"` // ^[1-9][0-9]{0,5}|1000000$
|
||||||
@@ -41,31 +40,35 @@ type SettingGuestAccess struct {
|
|||||||
FacebookWifiBlockHttps bool `json:"facebook_wifi_block_https"`
|
FacebookWifiBlockHttps bool `json:"facebook_wifi_block_https"`
|
||||||
FacebookWifiGwID string `json:"facebook_wifi_gw_id"`
|
FacebookWifiGwID string `json:"facebook_wifi_gw_id"`
|
||||||
FacebookWifiGwName string `json:"facebook_wifi_gw_name,omitempty"`
|
FacebookWifiGwName string `json:"facebook_wifi_gw_name,omitempty"`
|
||||||
Gateway string `json:"gateway,omitempty"` // paypal|stripe|authorize|quickpay|merchantwarrior|ippay
|
Gateway string `json:"gateway,omitempty"` // stripe
|
||||||
GoogleClientID string `json:"google_client_id"`
|
GoogleClientID string `json:"google_client_id"`
|
||||||
GoogleDomain string `json:"google_domain,omitempty"`
|
GoogleDomain string `json:"google_domain,omitempty"`
|
||||||
GoogleEnabled bool `json:"google_enabled"`
|
GoogleEnabled bool `json:"google_enabled"`
|
||||||
GoogleScopeEmail bool `json:"google_scope_email"`
|
GoogleScopeEmail bool `json:"google_scope_email"`
|
||||||
IPpayUseSandbox bool `json:"ippay_use_sandbox"`
|
|
||||||
MerchantwarriorUseSandbox bool `json:"merchantwarrior_use_sandbox"`
|
|
||||||
PasswordEnabled bool `json:"password_enabled"`
|
PasswordEnabled bool `json:"password_enabled"`
|
||||||
PaymentEnabled bool `json:"payment_enabled"`
|
PaymentEnabled bool `json:"payment_enabled"`
|
||||||
PaypalUseSandbox bool `json:"paypal_use_sandbox"`
|
|
||||||
PortalCustomized bool `json:"portal_customized"`
|
PortalCustomized bool `json:"portal_customized"`
|
||||||
|
PortalCustomizedAuthenticationText string `json:"portal_customized_authentication_text,omitempty"`
|
||||||
PortalCustomizedBgColor string `json:"portal_customized_bg_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedBgColor string `json:"portal_customized_bg_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedBgImageEnabled bool `json:"portal_customized_bg_image_enabled"`
|
PortalCustomizedBgImageEnabled bool `json:"portal_customized_bg_image_enabled"`
|
||||||
PortalCustomizedBgImageFilename string `json:"portal_customized_bg_image_filename,omitempty"`
|
PortalCustomizedBgImageFilename string `json:"portal_customized_bg_image_filename,omitempty"`
|
||||||
PortalCustomizedBgImageTile bool `json:"portal_customized_bg_image_tile"`
|
PortalCustomizedBgImageTile bool `json:"portal_customized_bg_image_tile"`
|
||||||
|
PortalCustomizedBgType string `json:"portal_customized_bg_type,omitempty"` // color|image|gallery
|
||||||
PortalCustomizedBoxColor string `json:"portal_customized_box_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedBoxColor string `json:"portal_customized_box_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedBoxLinkColor string `json:"portal_customized_box_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedBoxLinkColor string `json:"portal_customized_box_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedBoxOpacity int `json:"portal_customized_box_opacity,omitempty"` // ^[1-9][0-9]?$|^100$|^$
|
PortalCustomizedBoxOpacity int `json:"portal_customized_box_opacity,omitempty"` // ^[1-9][0-9]?$|^100$|^$
|
||||||
|
PortalCustomizedBoxRADIUS int `json:"portal_customized_box_radius,omitempty"` // [0-9]|[1-4][0-9]|50
|
||||||
PortalCustomizedBoxTextColor string `json:"portal_customized_box_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedBoxTextColor string `json:"portal_customized_box_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedButtonColor string `json:"portal_customized_button_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedButtonColor string `json:"portal_customized_button_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedButtonTextColor string `json:"portal_customized_button_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedButtonText string `json:"portal_customized_button_text,omitempty"`
|
||||||
PortalCustomizedLanguages []string `json:"portal_customized_languages,omitempty"` // ^[a-z]{2}(_[A-Z]{2})*$
|
PortalCustomizedButtonTextColor string `json:"portal_customized_button_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedLinkColor string `json:"portal_customized_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedLanguages []string `json:"portal_customized_languages,omitempty"` // ^[a-z]{2}([_-][a-zA-Z]{2,4})*$
|
||||||
|
PortalCustomizedLinkColor string `json:"portal_customized_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedLogoEnabled bool `json:"portal_customized_logo_enabled"`
|
PortalCustomizedLogoEnabled bool `json:"portal_customized_logo_enabled"`
|
||||||
PortalCustomizedLogoFilename string `json:"portal_customized_logo_filename,omitempty"`
|
PortalCustomizedLogoFilename string `json:"portal_customized_logo_filename,omitempty"`
|
||||||
|
PortalCustomizedLogoPosition string `json:"portal_customized_logo_position,omitempty"` // left|center|right
|
||||||
|
PortalCustomizedLogoSize int `json:"portal_customized_logo_size,omitempty"` // 6[4-9]|[7-9][0-9]|1[0-8][0-9]|19[0-2]
|
||||||
|
PortalCustomizedSuccessText string `json:"portal_customized_success_text,omitempty"`
|
||||||
PortalCustomizedTextColor string `json:"portal_customized_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
PortalCustomizedTextColor string `json:"portal_customized_text_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
|
||||||
PortalCustomizedTitle string `json:"portal_customized_title,omitempty"`
|
PortalCustomizedTitle string `json:"portal_customized_title,omitempty"`
|
||||||
PortalCustomizedTos string `json:"portal_customized_tos,omitempty"`
|
PortalCustomizedTos string `json:"portal_customized_tos,omitempty"`
|
||||||
@@ -78,7 +81,6 @@ type SettingGuestAccess struct {
|
|||||||
PortalEnabled bool `json:"portal_enabled"`
|
PortalEnabled bool `json:"portal_enabled"`
|
||||||
PortalHostname string `json:"portal_hostname"` // ^[a-zA-Z0-9.-]+$|^$
|
PortalHostname string `json:"portal_hostname"` // ^[a-zA-Z0-9.-]+$|^$
|
||||||
PortalUseHostname bool `json:"portal_use_hostname"`
|
PortalUseHostname bool `json:"portal_use_hostname"`
|
||||||
QuickpayTestmode bool `json:"quickpay_testmode"`
|
|
||||||
RADIUSAuthType string `json:"radius_auth_type,omitempty"` // chap|mschapv2
|
RADIUSAuthType string `json:"radius_auth_type,omitempty"` // chap|mschapv2
|
||||||
RADIUSDisconnectEnabled bool `json:"radius_disconnect_enabled"`
|
RADIUSDisconnectEnabled bool `json:"radius_disconnect_enabled"`
|
||||||
RADIUSDisconnectPort int `json:"radius_disconnect_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]
|
RADIUSDisconnectPort int `json:"radius_disconnect_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]
|
||||||
@@ -91,29 +93,16 @@ type SettingGuestAccess struct {
|
|||||||
RestrictedDNSEnabled bool `json:"restricted_dns_enabled"`
|
RestrictedDNSEnabled bool `json:"restricted_dns_enabled"`
|
||||||
RestrictedDNSServers []string `json:"restricted_dns_servers,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])$|^$
|
RestrictedDNSServers []string `json:"restricted_dns_servers,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])$|^$
|
||||||
RestrictedSubnet string `json:"restricted_subnet_,omitempty"`
|
RestrictedSubnet string `json:"restricted_subnet_,omitempty"`
|
||||||
SettingPreference string `json:"setting_preference,omitempty"` // auto|manual
|
TemplateEngine string `json:"template_engine,omitempty"` // jsp|angular
|
||||||
TemplateEngine string `json:"template_engine,omitempty"` // jsp|angular
|
|
||||||
VoucherCustomized bool `json:"voucher_customized"`
|
VoucherCustomized bool `json:"voucher_customized"`
|
||||||
VoucherEnabled bool `json:"voucher_enabled"`
|
VoucherEnabled bool `json:"voucher_enabled"`
|
||||||
WechatAppID string `json:"wechat_app_id"`
|
WechatAppID string `json:"wechat_app_id"`
|
||||||
WechatEnabled bool `json:"wechat_enabled"`
|
WechatEnabled bool `json:"wechat_enabled"`
|
||||||
WechatShopID string `json:"wechat_shop_id"`
|
WechatShopID string `json:"wechat_shop_id"`
|
||||||
XAuthorizeLoginid string `json:"x_authorize_loginid,omitempty"`
|
|
||||||
XAuthorizeTransactionkey string `json:"x_authorize_transactionkey,omitempty"`
|
|
||||||
XFacebookAppSecret string `json:"x_facebook_app_secret,omitempty"`
|
XFacebookAppSecret string `json:"x_facebook_app_secret,omitempty"`
|
||||||
XFacebookWifiGwSecret string `json:"x_facebook_wifi_gw_secret,omitempty"`
|
XFacebookWifiGwSecret string `json:"x_facebook_wifi_gw_secret,omitempty"`
|
||||||
XGoogleClientSecret string `json:"x_google_client_secret,omitempty"`
|
XGoogleClientSecret string `json:"x_google_client_secret,omitempty"`
|
||||||
XIPpayTerminalid string `json:"x_ippay_terminalid,omitempty"`
|
|
||||||
XMerchantwarriorApikey string `json:"x_merchantwarrior_apikey,omitempty"`
|
|
||||||
XMerchantwarriorApipassphrase string `json:"x_merchantwarrior_apipassphrase,omitempty"`
|
|
||||||
XMerchantwarriorMerchantuuid string `json:"x_merchantwarrior_merchantuuid,omitempty"`
|
|
||||||
XPassword string `json:"x_password,omitempty"`
|
XPassword string `json:"x_password,omitempty"`
|
||||||
XPaypalPassword string `json:"x_paypal_password,omitempty"`
|
|
||||||
XPaypalSignature string `json:"x_paypal_signature,omitempty"`
|
|
||||||
XPaypalUsername string `json:"x_paypal_username,omitempty"`
|
|
||||||
XQuickpayAgreementid string `json:"x_quickpay_agreementid,omitempty"`
|
|
||||||
XQuickpayApikey string `json:"x_quickpay_apikey,omitempty"`
|
|
||||||
XQuickpayMerchantid string `json:"x_quickpay_merchantid,omitempty"`
|
|
||||||
XStripeApiKey string `json:"x_stripe_api_key,omitempty"`
|
XStripeApiKey string `json:"x_stripe_api_key,omitempty"`
|
||||||
XWechatAppSecret string `json:"x_wechat_app_secret,omitempty"`
|
XWechatAppSecret string `json:"x_wechat_app_secret,omitempty"`
|
||||||
XWechatSecretKey string `json:"x_wechat_secret_key,omitempty"`
|
XWechatSecretKey string `json:"x_wechat_secret_key,omitempty"`
|
||||||
@@ -125,6 +114,8 @@ func (dst *SettingGuestAccess) UnmarshalJSON(b []byte) error {
|
|||||||
ExpireNumber emptyStringInt `json:"expire_number"`
|
ExpireNumber emptyStringInt `json:"expire_number"`
|
||||||
ExpireUnit emptyStringInt `json:"expire_unit"`
|
ExpireUnit emptyStringInt `json:"expire_unit"`
|
||||||
PortalCustomizedBoxOpacity emptyStringInt `json:"portal_customized_box_opacity"`
|
PortalCustomizedBoxOpacity emptyStringInt `json:"portal_customized_box_opacity"`
|
||||||
|
PortalCustomizedBoxRADIUS emptyStringInt `json:"portal_customized_box_radius"`
|
||||||
|
PortalCustomizedLogoSize emptyStringInt `json:"portal_customized_logo_size"`
|
||||||
RADIUSDisconnectPort emptyStringInt `json:"radius_disconnect_port"`
|
RADIUSDisconnectPort emptyStringInt `json:"radius_disconnect_port"`
|
||||||
|
|
||||||
*Alias
|
*Alias
|
||||||
@@ -139,6 +130,8 @@ func (dst *SettingGuestAccess) UnmarshalJSON(b []byte) error {
|
|||||||
dst.ExpireNumber = int(aux.ExpireNumber)
|
dst.ExpireNumber = int(aux.ExpireNumber)
|
||||||
dst.ExpireUnit = int(aux.ExpireUnit)
|
dst.ExpireUnit = int(aux.ExpireUnit)
|
||||||
dst.PortalCustomizedBoxOpacity = int(aux.PortalCustomizedBoxOpacity)
|
dst.PortalCustomizedBoxOpacity = int(aux.PortalCustomizedBoxOpacity)
|
||||||
|
dst.PortalCustomizedBoxRADIUS = int(aux.PortalCustomizedBoxRADIUS)
|
||||||
|
dst.PortalCustomizedLogoSize = int(aux.PortalCustomizedLogoSize)
|
||||||
dst.RADIUSDisconnectPort = int(aux.RADIUSDisconnectPort)
|
dst.RADIUSDisconnectPort = int(aux.RADIUSDisconnectPort)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
87
unifi/setting_magic_site_to_site_vpn.generated.go
generated
Normal file
87
unifi/setting_magic_site_to_site_vpn.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 SettingMagicSiteToSiteVpn 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"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (dst *SettingMagicSiteToSiteVpn) UnmarshalJSON(b []byte) error {
|
||||||
|
type Alias SettingMagicSiteToSiteVpn
|
||||||
|
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) getSettingMagicSiteToSiteVpn(ctx context.Context, site string) (*SettingMagicSiteToSiteVpn, error) {
|
||||||
|
var respBody struct {
|
||||||
|
Meta meta `json:"meta"`
|
||||||
|
Data []SettingMagicSiteToSiteVpn `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/get/setting/magic_site_to_site_vpn", 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) updateSettingMagicSiteToSiteVpn(ctx context.Context, site string, d *SettingMagicSiteToSiteVpn) (*SettingMagicSiteToSiteVpn, error) {
|
||||||
|
var respBody struct {
|
||||||
|
Meta meta `json:"meta"`
|
||||||
|
Data []SettingMagicSiteToSiteVpn `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
d.Key = "magic_site_to_site_vpn"
|
||||||
|
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/magic_site_to_site_vpn", site), d, &respBody)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(respBody.Data) != 1 {
|
||||||
|
return nil, &NotFoundError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
new := respBody.Data[0]
|
||||||
|
|
||||||
|
return &new, nil
|
||||||
|
}
|
||||||
30
unifi/user.generated.go
generated
30
unifi/user.generated.go
generated
@@ -28,20 +28,22 @@ type User struct {
|
|||||||
DevIdOverride int `json:"dev_id_override,omitempty"` // non-generated field
|
DevIdOverride int `json:"dev_id_override,omitempty"` // non-generated field
|
||||||
IP string `json:"ip,omitempty"` // non-generated field
|
IP string `json:"ip,omitempty"` // non-generated field
|
||||||
|
|
||||||
Blocked bool `json:"blocked,omitempty"`
|
Blocked bool `json:"blocked,omitempty"`
|
||||||
FixedApEnabled bool `json:"fixed_ap_enabled"`
|
FixedApEnabled bool `json:"fixed_ap_enabled"`
|
||||||
FixedApMAC string `json:"fixed_ap_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
FixedApMAC string `json:"fixed_ap_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||||
FixedIP string `json:"fixed_ip,omitempty"`
|
FixedIP string `json:"fixed_ip,omitempty"`
|
||||||
Hostname string `json:"hostname,omitempty"`
|
Hostname string `json:"hostname,omitempty"`
|
||||||
LastSeen int `json:"last_seen,omitempty"`
|
LastSeen int `json:"last_seen,omitempty"`
|
||||||
LocalDNSRecord string `json:"local_dns_record,omitempty"`
|
LocalDNSRecord string `json:"local_dns_record,omitempty"`
|
||||||
LocalDNSRecordEnabled bool `json:"local_dns_record_enabled"`
|
LocalDNSRecordEnabled bool `json:"local_dns_record_enabled"`
|
||||||
MAC string `json:"mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
MAC string `json:"mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
NetworkID string `json:"network_id"`
|
NetworkID string `json:"network_id"`
|
||||||
Note string `json:"note,omitempty"`
|
Note string `json:"note,omitempty"`
|
||||||
UseFixedIP bool `json:"use_fixedip"`
|
UseFixedIP bool `json:"use_fixedip"`
|
||||||
UserGroupID string `json:"usergroup_id"`
|
UserGroupID string `json:"usergroup_id"`
|
||||||
|
VirtualNetworkOverrideEnabled bool `json:"virtual_network_override_enabled"`
|
||||||
|
VirtualNetworkOverrideID string `json:"virtual_network_override_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dst *User) UnmarshalJSON(b []byte) error {
|
func (dst *User) UnmarshalJSON(b []byte) error {
|
||||||
|
|||||||
2
unifi/version.generated.go
generated
2
unifi/version.generated.go
generated
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
package unifi
|
package unifi
|
||||||
|
|
||||||
const UnifiVersion = "7.3.83"
|
const UnifiVersion = "7.4.156"
|
||||||
|
|||||||
1
unifi/wlan.generated.go
generated
1
unifi/wlan.generated.go
generated
@@ -73,7 +73,6 @@ type WLAN struct {
|
|||||||
Priority string `json:"priority,omitempty"` // medium|high|low
|
Priority string `json:"priority,omitempty"` // medium|high|low
|
||||||
ProxyArp bool `json:"proxy_arp"`
|
ProxyArp bool `json:"proxy_arp"`
|
||||||
RADIUSDasEnabled bool `json:"radius_das_enabled"`
|
RADIUSDasEnabled bool `json:"radius_das_enabled"`
|
||||||
RADIUSFilterIDEnabled bool `json:"radius_filter_id_enabled"`
|
|
||||||
RADIUSMACAuthEnabled bool `json:"radius_mac_auth_enabled"`
|
RADIUSMACAuthEnabled bool `json:"radius_mac_auth_enabled"`
|
||||||
RADIUSMACaclEmptyPassword bool `json:"radius_macacl_empty_password"`
|
RADIUSMACaclEmptyPassword bool `json:"radius_macacl_empty_password"`
|
||||||
RADIUSMACaclFormat string `json:"radius_macacl_format,omitempty"` // none_lower|hyphen_lower|colon_lower|none_upper|hyphen_upper|colon_upper
|
RADIUSMACaclFormat string `json:"radius_macacl_format,omitempty"` // none_lower|hyphen_lower|colon_lower|none_upper|hyphen_upper|colon_upper
|
||||||
|
|||||||
Reference in New Issue
Block a user