Updated types to 5.14.23

This commit is contained in:
James Stephenson
2020-09-02 17:37:16 -04:00
committed by Paul Tyng
parent bee58f48d4
commit fa5012f42a
8 changed files with 226 additions and 186 deletions

View File

@@ -47,15 +47,17 @@ type Device struct {
LedOverrideColor string `json:"led_override_color,omitempty"` // ^#(?:[0-9a-fA-F]{3}){1,2}$
LedOverrideColorBrightness int `json:"led_override_color_brightness,omitempty"` // ^[0-9][0-9]?$|^100$
Locked bool `json:"locked,omitempty"`
LteApn string `json:"lte_apn,omitempty"` // .{1,128}
LteExtAnt bool `json:"lte_ext_ant,omitempty"`
LtePoe bool `json:"lte_poe,omitempty"`
LteSimPin int `json:"lte_sim_pin,omitempty"`
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
MapID string `json:"map_id,omitempty"`
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
MgmtNetworkID string `json:"mgmt_network_id,omitempty"` // [\d\w]+
Name string `json:"name,omitempty"` // .{1,128}
OutdoorModeOverride string `json:"outdoor_mode_override,omitempty"` // default|on|off
OutletCycleEnabled bool `json:"outlet_cycle_enabled,omitempty"`
OutletEnabled bool `json:"outlet_enabled,omitempty"`
OutletOverrides []Device_OutletOverrides `json:"outlet_overrides,omitempty"`
PortOverrides []Device_PortOverrides `json:"port_overrides,omitempty"`
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
@@ -94,7 +96,9 @@ type Device_EthernetOverrides struct {
}
type Device_OutletOverrides struct {
CycleEnabled bool `json:"cycle_enabled,omitempty"`
Index int `json:"index,omitempty"`
Name string `json:"name,omitempty"` // .{0,128}
RelayState bool `json:"relay_state,omitempty"`
}
@@ -102,6 +106,7 @@ type Device_PortOverrides struct {
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-6]
Autoneg bool `json:"autoneg,omitempty"`
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled,omitempty"`
FullDuplex bool `json:"full_duplex,omitempty"`

View File

@@ -32,8 +32,8 @@ type FirewallRule struct {
DstNetworkType string `json:"dst_networkconf_type,omitempty"` // ADDRv4|NETv4
DstPort string `json:"dst_port,omitempty"`
Enabled bool `json:"enabled"`
ICMPTypename string `json:"icmp_typename"` // ^$|communication-prohibited|destination-unreachable|echo-reply|echo-request|fragmentation-needed|host-precedence-violation|host-prohibited|host-redirect|host-unknown|host-unreachable|ip-header-bad|network-prohibited|network-redirect|network-unknown|network-unreachable|parameter-problem|port-unreachable|protocol-unreachable|redirect|required-option-missing|router-advertisement|router-solicitation|source-route-failed|timestamp-reply|timestamp-request|TOS-host-redirect|TOS-host-unreachable|TOS-network-redirect|TOS-network-unreachable|ttl-exceeded|ttl-zero-during-reassembly|ttl-zero-during-transit
ICMPv6Typename string `json:"icmpv6_typename"` // ^$|address-unreachable|bad-header|communication-prohibited|destination-unreachable|echo-reply|echo-request|neighbor-advertisement|neighbor-solicitation|no-route|packet-too-big|parameter-problem|port-unreachable|redirect|router-advertisement|router-solicitation|time-exceeded|ttl-zero-during-reassembly|ttl-zero-during-transit|unknown-header-type|unknown-option
ICMPTypename string `json:"icmp_typename"` // ^$|address-mask-reply|address-mask-request|any|communication-prohibited|destination-unreachable|echo-reply|echo-request|fragmentation-needed|host-precedence-violation|host-prohibited|host-redirect|host-unknown|host-unreachable|ip-header-bad|network-prohibited|network-redirect|network-unknown|network-unreachable|parameter-problem|port-unreachable|precedence-cutoff|protocol-unreachable|redirect|required-option-missing|router-advertisement|router-solicitation|source-quench|source-route-failed|time-exceeded|timestamp-reply|timestamp-request|TOS-host-redirect|TOS-host-unreachable|TOS-network-redirect|TOS-network-unreachable|ttl-zero-during-reassembly|ttl-zero-during-transit
ICMPv6Typename string `json:"icmpv6_typename"` // ^$|address-unreachable|bad-header|beyond-scope|communication-prohibited|destination-unreachable|echo-reply|echo-request|failed-policy|neighbor-advertisement|neighbor-solicitation|no-route|packet-too-big|parameter-problem|port-unreachable|redirect|reject-route|router-advertisement|router-solicitation|time-exceeded|ttl-zero-during-reassembly|ttl-zero-during-transit|unknown-header-type|unknown-option
IPSec string `json:"ipsec"` // match-ipsec|match-none|^$
Logging bool `json:"logging"`
MonthDays string `json:"monthdays"` // ^$|^(([1-9]|[12][0-9]|3[01])(,([1-9]|[12][0-9]|3[01])){0,30})$

View File

@@ -23,38 +23,51 @@ type Hotspot2Conf struct {
NoDelete bool `json:"attr_no_delete,omitempty"`
NoEdit bool `json:"attr_no_edit,omitempty"`
ApIsolate bool `json:"ap_isolate"`
AnqpDomainID int `json:"anqp_domain_id,omitempty"` // ^0|[1-9][0-9]{0,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]|$
Capab []Hotspot2Conf_Capab `json:"capab,omitempty"`
CellularNetworkList []Hotspot2Conf_CellularNetworkList `json:"cellular_network_list,omitempty"`
DeauthReqTimeout int `json:"deauth_req_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
DisableDgaf bool `json:"disable_dgaf"`
DomainNameList []string `json:"domain_name_list,omitempty"` // .{1,128}
FriendlyName []Hotspot2Conf_FriendlyName `json:"friendly_name,omitempty"`
GasComebackDelay int `json:"gas_comeback_delay,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]|300
GasAdvanced bool `json:"gas_advanced"`
GasComebackDelay int `json:"gas_comeback_delay,omitempty"`
GasFragLimit int `json:"gas_frag_limit,omitempty"`
Hessid string `json:"hessid"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$|^$
HessidUsed bool `json:"hessid_used"`
IPaddrTypeAvailV4 int `json:"ipaddr_type_avail_v4,omitempty"` // 0|1|2|3|4|5|6|7
IPaddrTypeAvailV6 int `json:"ipaddr_type_avail_v6,omitempty"` // 0|1|2
Icons []Hotspot2Conf_Icons `json:"icons,omitempty"`
MetricsDownlinkLoad int `json:"metrics_downlink_load,omitempty"`
MetricsDownlinkLoadSet bool `json:"metrics_downlink_load_set"`
MetricsDownlinkSpeed int `json:"metrics_downlink_speed,omitempty"`
MetricsInfo string `json:"metrics_info,omitempty"` // [0-9A-Fa-f]{1,2}
MetricsDownlinkSpeedSet bool `json:"metrics_downlink_speed_set"`
MetricsInfoAtCapacity bool `json:"metrics_info_at_capacity"`
MetricsInfoLinkStatus string `json:"metrics_info_link_status,omitempty"` // up|down|test
MetricsInfoSymmetric bool `json:"metrics_info_symmetric"`
MetricsMeasurement int `json:"metrics_measurement,omitempty"`
MetricsMeasurementSet bool `json:"metrics_measurement_set"`
MetricsStatus bool `json:"metrics_status"`
MetricsUplinkLoad int `json:"metrics_uplink_load,omitempty"`
MetricsUplinkLoadSet bool `json:"metrics_uplink_load_set"`
MetricsUplinkSpeed int `json:"metrics_uplink_speed,omitempty"`
MetricsUplinkSpeedSet bool `json:"metrics_uplink_speed_set"`
NaiRealmList []Hotspot2Conf_NaiRealmList `json:"nai_realm_list,omitempty"`
Name string `json:"name,omitempty"` // .{1,128}
NetworkAccessAsra bool `json:"network_access_asra"`
NetworkAccessEsr bool `json:"network_access_esr"`
NetworkAccessInternet bool `json:"network_access_internet"`
NetworkAccessUesa bool `json:"network_access_uesa"`
NetworkAuthType int `json:"network_auth_type,omitempty"` // -1|0|1|2|3
NetworkAuthUrl string `json:"network_auth_url,omitempty"`
NetworkType int `json:"network_type,omitempty"` // 0|1|2|3|4|5|14|15
Osu []Hotspot2Conf_Osu `json:"osu,omitempty"`
OsuSSID string `json:"osu_ssid"`
P2P bool `json:"p2p"`
ProxyArp bool `json:"proxy_arp"`
QOSMapDcsp []Hotspot2Conf_QOSMapDcsp `json:"qos_map_dcsp,omitempty"`
QOSMapExceptions []Hotspot2Conf_QOSMapExceptions `json:"qos_map_exceptions,omitempty"`
QOSMapStatus bool `json:"qos_map_status"`
RoamingConsortiumList []Hotspot2Conf_RoamingConsortiumList `json:"roaming_consortium_list,omitempty"`
SaveTimestamp string `json:"save_timestamp,omitempty"`
TCFilename string `json:"t_c_filename,omitempty"` // .{1,256}
TCTimestamp int `json:"t_c_timestamp,omitempty"`
VenueGroup int `json:"venue_group,omitempty"` // 0|1|2|3|4|5|6|7|8|9|10|11
@@ -63,8 +76,8 @@ type Hotspot2Conf struct {
}
type Hotspot2Conf_Capab struct {
Port string `json:"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}
Protocol string `json:"protocol,omitempty"` // icmp|tcp_udp|tcp|udp
Port int `json:"port,omitempty"` // ^(0|[1-9][0-9]{0,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])|$
Protocol string `json:"protocol,omitempty"` // icmp|tcp_udp|tcp|udp|esp
Status string `json:"status,omitempty"` // closed|open|unknown
}
@@ -137,7 +150,8 @@ type Hotspot2Conf_RoamingConsortiumList struct {
type Hotspot2Conf_VenueName struct {
Language string `json:"language,omitempty"` // [a-z]{3}
Name string `json:"name,omitempty"` // .{1,128}
Name string `json:"name,omitempty"`
Url string `json:"url,omitempty"`
}
func (c *Client) listHotspot2Conf(ctx context.Context, site string) ([]Hotspot2Conf, error) {

View File

@@ -70,6 +70,8 @@ type Network struct {
DomainName string `json:"domain_name"` // (?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^$|[a-zA-Z0-9-]{1,63}
Enabled bool `json:"enabled"`
ExposedToSiteVPN bool `json:"exposed_to_site_vpn"`
GatewayDevice string `json:"gateway_device"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
GatewayType string `json:"gateway_type,omitempty"` // default|switch
IGMPFastleave bool `json:"igmp_fastleave"`
IGMPGroupmembership int `json:"igmp_groupmembership,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-2][0-9]{3}|3[0-5][0-9]{2}|3600|^$
IGMPMaxresponse int `json:"igmp_maxresponse,omitempty"` // [1-9]|1[0-9]|2[0-5]|^$
@@ -131,7 +133,8 @@ type Network struct {
VLANEnabled bool `json:"vlan_enabled"`
VPNClientDefaultRoute bool `json:"vpn_client_default_route"`
VPNClientPullDNS bool `json:"vpn_client_pull_dns"`
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-vpn|pptp-client|l2tp-server|pptp-server
VPNType string `json:"vpn_type,omitempty"` // auto|ipsec-vpn|openvpn-vpn|pptp-client|l2tp-server|pptp-server|uid-server
WANDHCPOptions []Network_WANDHCPOptions `json:"wan_dhcp_options,omitempty"`
WANDHCPv6PDSize int `json:"wan_dhcpv6_pd_size,omitempty"` // ^(4[89]|5[0-9]|6[0-4])$|^$
WANDNS1 string `json:"wan_dns1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
WANDNS2 string `json:"wan_dns2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
@@ -161,6 +164,11 @@ type Network struct {
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
}
type Network_WANDHCPOptions struct {
OptionNumber int `json:"optionNumber,omitempty"` // ([1-9]|[1-8][0-9]|9[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-4])
Value string `json:"value,omitempty"`
}
func (c *Client) listNetwork(ctx context.Context, site string) ([]Network, error) {
var respBody struct {
Meta meta `json:"meta"`

View File

@@ -25,6 +25,7 @@ type PortConf struct {
Autoneg bool `json:"autoneg"`
Dot1XCtrl string `json:"dot1x_ctrl,omitempty"` // auto|force_authorized|force_unauthorized|mac_based|multi_host
Dot1XIDleTimeout int `json:"dot1x_idle_timeout,omitempty"` // [0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]
EgressRateLimitKbps int `json:"egress_rate_limit_kbps,omitempty"` // 6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}
EgressRateLimitKbpsEnabled bool `json:"egress_rate_limit_kbps_enabled"`
Forward string `json:"forward,omitempty"` // all|native|customize|disabled

View File

@@ -48,7 +48,12 @@ type SettingIps_Alerts struct {
}
type SettingIps_DNSFilters struct {
Filter string `json:"filter,omitempty"` // security|adult|family
AllowedSites []string `json:"allowed_sites,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
BlockedSites []string `json:"blocked_sites,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
BlockedTld []string `json:"blocked_tld,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
Description string `json:"description,omitempty"`
Filter string `json:"filter,omitempty"` // none|security|adult|family
Name string `json:"name,omitempty"`
NetworkID string `json:"network_id"`
Version string `json:"version,omitempty"` // v4|v6
}

View File

@@ -25,6 +25,7 @@ type SettingSuperMgmt struct {
Key string `json:"key"`
AnalyticsDisapprovedFor string `json:"analytics_disapproved_for,omitempty"`
AutoUpgrade bool `json:"auto_upgrade"`
AutobackupCronExpr string `json:"autobackup_cron_expr,omitempty"`
AutobackupDays int `json:"autobackup_days,omitempty"`
@@ -67,7 +68,6 @@ type SettingSuperMgmt struct {
OverrideInformHost bool `json:"override_inform_host"`
StoreEnabled string `json:"store_enabled,omitempty"` // disabled|super-only|everyone
TimeSeriesPerClientStatsEnabled bool `json:"time_series_per_client_stats_enabled"`
UploadDebuggingInfoEnabled bool `json:"upload_debugging_info_enabled"`
XSshPassword string `json:"x_ssh_password,omitempty"`
XSshUsername string `json:"x_ssh_username,omitempty"`
}

View File

@@ -23,8 +23,10 @@ type WLAN struct {
NoDelete bool `json:"attr_no_delete,omitempty"`
NoEdit bool `json:"attr_no_edit,omitempty"`
AuthCache bool `json:"auth_cache"`
BroadcastFilterEnabled bool `json:"bc_filter_enabled"`
BroadcastFilterList []string `json:"bc_filter_list,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
BssTransition bool `json:"bss_transition"`
CountryBeacon bool `json:"country_beacon"`
DPIEnabled bool `json:"dpi_enabled"`
DPIgroupID string `json:"dpigroup_id"` // [\d\w]+|^$
@@ -40,6 +42,7 @@ type WLAN struct {
Hotspot2ConfID string `json:"hotspot2conf_id"`
IappEnabled bool `json:"iapp_enabled"`
IsGuest bool `json:"is_guest"`
L2Isolation bool `json:"l2_isolation"`
MACFilterEnabled bool `json:"mac_filter_enabled"`
MACFilterList []string `json:"mac_filter_list,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
MACFilterPolicy string `json:"mac_filter_policy,omitempty"` // allow|deny
@@ -59,7 +62,10 @@ type WLAN struct {
NameCombineEnabled bool `json:"name_combine_enabled"`
NameCombineSuffix string `json:"name_combine_suffix,omitempty"` // .{0,8}
No2GhzOui bool `json:"no2ghz_oui"`
P2P bool `json:"p2p"`
P2PCrossConnect bool `json:"p2p_cross_connect"`
Priority string `json:"priority,omitempty"` // medium|high|low
ProxyArp bool `json:"proxy_arp"`
RADIUSDasEnabled bool `json:"radius_das_enabled"`
RADIUSMACAuthEnabled bool `json:"radius_mac_auth_enabled"`
RADIUSMACaclEmptyPassword bool `json:"radius_macacl_empty_password"`
@@ -70,7 +76,8 @@ type WLAN struct {
Schedule []string `json:"schedule,omitempty"` // (sun|mon|tue|wed|thu|fri|sat)(\-(sun|mon|tue|wed|thu|fri|sat))?\|([0-2][0-9][0-5][0-9])\-([0-2][0-9][0-5][0-9])
ScheduleEnabled bool `json:"schedule_enabled"`
ScheduleReversed bool `json:"schedule_reversed"`
Security string `json:"security,omitempty"` // open|wpapsk|wep|wpaeap
Security string `json:"security,omitempty"` // open|wpapsk|wep|wpaeap|osen
TdlsProhibit bool `json:"tdls_prohibit"`
UapsdEnabled bool `json:"uapsd_enabled"`
UserGroupID string `json:"usergroup_id"`
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-5]|^$