Refactored field processing in generator.
* Allows for specifying more customizations per field in each type. Previously, the switch clause didn't allow sub-types to be modified, but that became a problem with some of the more complex types. * Fixed several problematic fields in the Device resource * Removed the underscore separator from generated type names
This commit is contained in:
committed by
Paul Tyng
parent
fa5012f42a
commit
16c246525b
105
fields/main.go
105
fields/main.go
@@ -86,9 +86,10 @@ var fileReps = []replacement{
|
|||||||
var embedTypes bool
|
var embedTypes bool
|
||||||
|
|
||||||
type Resource struct {
|
type Resource struct {
|
||||||
StructName string
|
StructName string
|
||||||
ResourcePath string
|
ResourcePath string
|
||||||
Types map[string]*FieldInfo
|
Types map[string]*FieldInfo
|
||||||
|
FieldProcessor func(name string, f *FieldInfo) error
|
||||||
}
|
}
|
||||||
|
|
||||||
type FieldInfo struct {
|
type FieldInfo struct {
|
||||||
@@ -109,6 +110,7 @@ func NewResource(structName string, resourcePath string) *Resource {
|
|||||||
Types: map[string]*FieldInfo{
|
Types: map[string]*FieldInfo{
|
||||||
structName: baseType,
|
structName: baseType,
|
||||||
},
|
},
|
||||||
|
FieldProcessor: func(name string, f *FieldInfo) error { return nil },
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since template files iterate through map keys in sorted order, these initial fields
|
// Since template files iterate through map keys in sorted order, these initial fields
|
||||||
@@ -135,6 +137,10 @@ func NewResource(structName string, resourcePath string) *Resource {
|
|||||||
baseType.Fields[" Key"] = NewFieldInfo("Key", "key", "string", "", false, false)
|
baseType.Fields[" Key"] = NewFieldInfo("Key", "key", "string", "", false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resource.StructName == "Device" {
|
||||||
|
baseType.Fields[" MAC"] = NewFieldInfo("MAC", "mac", "string", "", false, false)
|
||||||
|
}
|
||||||
|
|
||||||
if resource.StructName == "User" {
|
if resource.StructName == "User" {
|
||||||
baseType.Fields[" IP"] = NewFieldInfo("IP", "ip", "string", "non-generated field", true, false)
|
baseType.Fields[" IP"] = NewFieldInfo("IP", "ip", "string", "non-generated field", true, false)
|
||||||
}
|
}
|
||||||
@@ -229,6 +235,48 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource := NewResource(structName, urlPath)
|
resource := NewResource(structName, urlPath)
|
||||||
|
|
||||||
|
switch resource.StructName {
|
||||||
|
case "Account":
|
||||||
|
resource.FieldProcessor = func(name string, f *FieldInfo) error {
|
||||||
|
if name == "IP" {
|
||||||
|
f.OmitEmpty = true
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case "Device":
|
||||||
|
resource.FieldProcessor = func(name string, f *FieldInfo) error {
|
||||||
|
switch name {
|
||||||
|
case "X", "Y":
|
||||||
|
f.FieldType = "float64"
|
||||||
|
case "Channel", "BackupChannel", "TxPower":
|
||||||
|
f.FieldType = "int"
|
||||||
|
case "StpPriority", "Ht":
|
||||||
|
f.FieldType = "string"
|
||||||
|
}
|
||||||
|
|
||||||
|
f.OmitEmpty = true
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case "SettingUsg":
|
||||||
|
resource.FieldProcessor = func(name string, f *FieldInfo) error {
|
||||||
|
if strings.HasSuffix(name, "Timeout") && name != "ArpCacheTimeout" {
|
||||||
|
f.FieldType = "int"
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case "User":
|
||||||
|
resource.FieldProcessor = func(name string, f *FieldInfo) error {
|
||||||
|
switch name {
|
||||||
|
case "Blocked":
|
||||||
|
f.FieldType = "bool"
|
||||||
|
case "LastSeen":
|
||||||
|
f.FieldType = "int"
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err = resource.processJSON(b)
|
err = resource.processJSON(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("skipping file %s: %s", fieldsFile.Name(), err)
|
fmt.Printf("skipping file %s: %s", fieldsFile.Name(), err)
|
||||||
@@ -256,30 +304,11 @@ func (r *Resource) processFields(fields map[string]interface{}) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
|
||||||
case r.StructName == "Account" && name == "ip":
|
|
||||||
fieldInfo.OmitEmpty = true
|
|
||||||
case r.StructName == "Device" && name == "stp_priority":
|
|
||||||
fieldInfo.OmitEmpty = true
|
|
||||||
fieldInfo.FieldType = "string"
|
|
||||||
case r.StructName == "Device" && (name == "x" || name == "y"):
|
|
||||||
fieldInfo.OmitEmpty = true
|
|
||||||
fieldInfo.FieldType = "int"
|
|
||||||
case r.StructName == "Device":
|
|
||||||
fieldInfo.OmitEmpty = true
|
|
||||||
case r.StructName == "SettingUsg" && strings.HasSuffix(name, "_timeout") && name != "arp_cache_timeout":
|
|
||||||
fieldInfo.FieldType = "int"
|
|
||||||
case r.StructName == "User" && name == "blocked":
|
|
||||||
fieldInfo.FieldType = "bool"
|
|
||||||
case r.StructName == "User" && name == "last_seen":
|
|
||||||
fieldInfo.FieldType = "int"
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Fields[fieldInfo.FieldName] = fieldInfo
|
t.Fields[fieldInfo.FieldName] = fieldInfo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Resource) fieldInfoFromValidation(name string, validation interface{}) (f *FieldInfo, err error) {
|
func (r *Resource) fieldInfoFromValidation(name string, validation interface{}) (fieldInfo *FieldInfo, err error) {
|
||||||
fieldName := strcase.ToCamel(name)
|
fieldName := strcase.ToCamel(name)
|
||||||
fieldName = cleanName(fieldName, fieldReps)
|
fieldName = cleanName(fieldName, fieldReps)
|
||||||
|
|
||||||
@@ -288,7 +317,9 @@ func (r *Resource) fieldInfoFromValidation(name string, validation interface{})
|
|||||||
switch validation := validation.(type) {
|
switch validation := validation.(type) {
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
if len(validation) == 0 {
|
if len(validation) == 0 {
|
||||||
return NewFieldInfo(fieldName, name, "string", "", false, true), nil
|
fieldInfo, err = NewFieldInfo(fieldName, name, "string", "", false, true), nil
|
||||||
|
err = r.FieldProcessor(fieldName, fieldInfo)
|
||||||
|
return fieldInfo, err
|
||||||
}
|
}
|
||||||
if len(validation) > 1 {
|
if len(validation) > 1 {
|
||||||
return empty, fmt.Errorf("unknown validation %#v", validation)
|
return empty, fmt.Errorf("unknown validation %#v", validation)
|
||||||
@@ -302,9 +333,11 @@ func (r *Resource) fieldInfoFromValidation(name string, validation interface{})
|
|||||||
fieldInfo.OmitEmpty = true
|
fieldInfo.OmitEmpty = true
|
||||||
fieldInfo.IsArray = true
|
fieldInfo.IsArray = true
|
||||||
|
|
||||||
return fieldInfo, nil
|
err = r.FieldProcessor(fieldName, fieldInfo)
|
||||||
|
return fieldInfo, err
|
||||||
|
|
||||||
case map[string]interface{}:
|
case map[string]interface{}:
|
||||||
typeName := r.StructName + "_" + fieldName
|
typeName := r.StructName + fieldName
|
||||||
|
|
||||||
result := NewFieldInfo(fieldName, name, typeName, "", true, false)
|
result := NewFieldInfo(fieldName, name, typeName, "", true, false)
|
||||||
result.Fields = make(map[string]*FieldInfo)
|
result.Fields = make(map[string]*FieldInfo)
|
||||||
@@ -318,20 +351,23 @@ func (r *Resource) fieldInfoFromValidation(name string, validation interface{})
|
|||||||
result.Fields[child.FieldName] = child
|
result.Fields[child.FieldName] = child
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = r.FieldProcessor(fieldName, result)
|
||||||
r.Types[typeName] = result
|
r.Types[typeName] = result
|
||||||
return result, nil
|
return result, err
|
||||||
|
|
||||||
case string:
|
case string:
|
||||||
fieldValidation := validation
|
fieldValidation := validation
|
||||||
normalized := normalizeValidation(validation)
|
normalized := normalizeValidation(validation)
|
||||||
|
|
||||||
omitEmpty := r.StructName == "Device"
|
omitEmpty := false
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case normalized == "falsetrue" || normalized == "truefalse":
|
case normalized == "falsetrue" || normalized == "truefalse":
|
||||||
return NewFieldInfo(fieldName, name, "bool", "", omitEmpty, false), nil
|
fieldInfo, err = NewFieldInfo(fieldName, name, "bool", "", omitEmpty, false), nil
|
||||||
|
return fieldInfo, r.FieldProcessor(fieldName, fieldInfo)
|
||||||
default:
|
default:
|
||||||
if _, err := strconv.ParseFloat(normalized, 64); err == nil {
|
if _, err := strconv.ParseFloat(normalized, 64); err == nil {
|
||||||
|
|
||||||
if normalized == "09" || normalized == "09.09" {
|
if normalized == "09" || normalized == "09.09" {
|
||||||
fieldValidation = ""
|
fieldValidation = ""
|
||||||
}
|
}
|
||||||
@@ -341,10 +377,14 @@ func (r *Resource) fieldInfoFromValidation(name string, validation interface{})
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewFieldInfo(fieldName, name, "float64", fieldValidation, true, false), nil
|
omitEmpty = true
|
||||||
|
fieldInfo, err = NewFieldInfo(fieldName, name, "float64", fieldValidation, omitEmpty, false), nil
|
||||||
|
return fieldInfo, r.FieldProcessor(fieldName, fieldInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewFieldInfo(fieldName, name, "int", fieldValidation, true, false), nil
|
omitEmpty = true
|
||||||
|
fieldInfo, err = NewFieldInfo(fieldName, name, "int", fieldValidation, omitEmpty, false), nil
|
||||||
|
return fieldInfo, r.FieldProcessor(fieldName, fieldInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if validation != "" && normalized != "" {
|
if validation != "" && normalized != "" {
|
||||||
@@ -352,7 +392,8 @@ func (r *Resource) fieldInfoFromValidation(name string, validation interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
omitEmpty = omitEmpty || (!strings.Contains(validation, "^$") && !strings.HasSuffix(fieldName, "ID"))
|
omitEmpty = omitEmpty || (!strings.Contains(validation, "^$") && !strings.HasSuffix(fieldName, "ID"))
|
||||||
return NewFieldInfo(fieldName, name, "string", fieldValidation, omitEmpty, false), nil
|
fieldInfo, err = NewFieldInfo(fieldName, name, "string", fieldValidation, omitEmpty, false), nil
|
||||||
|
return fieldInfo, r.FieldProcessor(fieldName, fieldInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
return empty, fmt.Errorf("unable to determine type from validation %q", validation)
|
return empty, fmt.Errorf("unable to determine type from validation %q", validation)
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ func TestFieldInfoFromValidation(t *testing.T) {
|
|||||||
{"bool", "", false, "true|false"},
|
{"bool", "", false, "true|false"},
|
||||||
} {
|
} {
|
||||||
t.Run(fmt.Sprintf("%d %s %s", i, c.expectedType, c.validation), func(t *testing.T) {
|
t.Run(fmt.Sprintf("%d %s %s", i, c.expectedType, c.validation), func(t *testing.T) {
|
||||||
resource := &Resource{StructName: "TestType", Types: make(map[string]*FieldInfo)}
|
resource := &Resource{
|
||||||
|
StructName: "TestType",
|
||||||
|
Types: make(map[string]*FieldInfo),
|
||||||
|
FieldProcessor: func(name string, f *FieldInfo) error { return nil },
|
||||||
|
}
|
||||||
|
|
||||||
fieldInfo, err := resource.fieldInfoFromValidation("fieldName", c.validation)
|
fieldInfo, err := resource.fieldInfoFromValidation("fieldName", c.validation)
|
||||||
//actualType, actualComment, actualOmitEmpty, err := fieldInfoFromValidation(c.validation)
|
//actualType, actualComment, actualOmitEmpty, err := fieldInfoFromValidation(c.validation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -74,23 +79,23 @@ func TestResourceTypes(t *testing.T) {
|
|||||||
"NestedType": &FieldInfo{
|
"NestedType": &FieldInfo{
|
||||||
FieldName: "NestedType",
|
FieldName: "NestedType",
|
||||||
JSONName: "nested_type",
|
JSONName: "nested_type",
|
||||||
FieldType: "Struct_NestedType",
|
FieldType: "StructNestedType",
|
||||||
FieldValidation: "",
|
FieldValidation: "",
|
||||||
OmitEmpty: true,
|
OmitEmpty: true,
|
||||||
IsArray: false,
|
IsArray: false,
|
||||||
Fields: map[string]*FieldInfo{
|
Fields: map[string]*FieldInfo{
|
||||||
"NestedField": NewFieldInfo("NestedField", "nested_field", "string", "^$", false, false),
|
"NestedFieldModified": NewFieldInfo("NestedFieldModified", "nested_field", "string", "^$", false, false),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"NestedTypeArray": &FieldInfo{
|
"NestedTypeArray": &FieldInfo{
|
||||||
FieldName: "NestedTypeArray",
|
FieldName: "NestedTypeArray",
|
||||||
JSONName: "nested_type_array",
|
JSONName: "nested_type_array",
|
||||||
FieldType: "Struct_NestedTypeArray",
|
FieldType: "StructNestedTypeArray",
|
||||||
FieldValidation: "",
|
FieldValidation: "",
|
||||||
OmitEmpty: true,
|
OmitEmpty: true,
|
||||||
IsArray: true,
|
IsArray: true,
|
||||||
Fields: map[string]*FieldInfo{
|
Fields: map[string]*FieldInfo{
|
||||||
"NestedField": NewFieldInfo("NestedField", "nested_field", "string", "^$", false, false),
|
"NestedFieldModified": NewFieldInfo("NestedFieldModified", "nested_field", "string", "^$", false, false),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -126,17 +131,28 @@ func TestResourceTypes(t *testing.T) {
|
|||||||
ResourcePath: "path",
|
ResourcePath: "path",
|
||||||
|
|
||||||
Types: map[string]*FieldInfo{
|
Types: map[string]*FieldInfo{
|
||||||
"Struct": expectedStruct["Struct"],
|
"Struct": expectedStruct["Struct"],
|
||||||
"Struct_NestedType": expectedStruct["Struct"].Fields["NestedType"],
|
"StructNestedType": expectedStruct["Struct"].Fields["NestedType"],
|
||||||
"Struct_NestedTypeArray": expectedStruct["Struct"].Fields["NestedTypeArray"],
|
"StructNestedTypeArray": expectedStruct["Struct"].Fields["NestedTypeArray"],
|
||||||
|
},
|
||||||
|
|
||||||
|
FieldProcessor: func(name string, f *FieldInfo) error {
|
||||||
|
if name == "NestedField" {
|
||||||
|
f.FieldName = "NestedFieldModified"
|
||||||
|
}
|
||||||
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Run("structural test", func(t *testing.T) {
|
t.Run("structural test", func(t *testing.T) {
|
||||||
resource := NewResource("Struct", "path")
|
resource := NewResource("Struct", "path")
|
||||||
|
resource.FieldProcessor = expectation.FieldProcessor
|
||||||
|
|
||||||
err := resource.processJSON(([]byte)(testData))
|
err := resource.processJSON(([]byte)(testData))
|
||||||
|
|
||||||
assert.Empty(t, err, "No error processing JSON")
|
assert.Empty(t, err, "No error processing JSON")
|
||||||
assert.Equal(t, expectation, resource)
|
assert.Equal(t, expectation.StructName, resource.StructName)
|
||||||
|
assert.Equal(t, expectation.ResourcePath, resource.ResourcePath)
|
||||||
|
assert.Equal(t, expectation.Types, resource.Types)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,32 +23,32 @@ type ChannelPlan 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"`
|
||||||
|
|
||||||
ApBlacklistedChannels []ChannelPlan_ApBlacklistedChannels `json:"ap_blacklisted_channels,omitempty"`
|
ApBlacklistedChannels []ChannelPlanApBlacklistedChannels `json:"ap_blacklisted_channels,omitempty"`
|
||||||
ConfSource string `json:"conf_source,omitempty"` // manual|radio-ai
|
ConfSource string `json:"conf_source,omitempty"` // manual|radio-ai
|
||||||
Coupling []ChannelPlan_Coupling `json:"coupling,omitempty"`
|
Coupling []ChannelPlanCoupling `json:"coupling,omitempty"`
|
||||||
Date string `json:"date"` // ^$|^(20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])Z?$
|
Date string `json:"date"` // ^$|^(20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])Z?$
|
||||||
Fitness float64 `json:"fitness,omitempty"`
|
Fitness float64 `json:"fitness,omitempty"`
|
||||||
Note string `json:"note,omitempty"` // .{0,1024}
|
Note string `json:"note,omitempty"` // .{0,1024}
|
||||||
Radio string `json:"radio,omitempty"` // na|ng|ng\+na
|
Radio string `json:"radio,omitempty"` // na|ng|ng\+na
|
||||||
RadioTable []ChannelPlan_RadioTable `json:"radio_table,omitempty"`
|
RadioTable []ChannelPlanRadioTable `json:"radio_table,omitempty"`
|
||||||
Satisfaction float64 `json:"satisfaction,omitempty"`
|
Satisfaction float64 `json:"satisfaction,omitempty"`
|
||||||
SatisfactionTable []ChannelPlan_SatisfactionTable `json:"satisfaction_table,omitempty"`
|
SatisfactionTable []ChannelPlanSatisfactionTable `json:"satisfaction_table,omitempty"`
|
||||||
SiteBlacklistedChannels []ChannelPlan_SiteBlacklistedChannels `json:"site_blacklisted_channels,omitempty"`
|
SiteBlacklistedChannels []ChannelPlanSiteBlacklistedChannels `json:"site_blacklisted_channels,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelPlan_ApBlacklistedChannels struct {
|
type ChannelPlanApBlacklistedChannels struct {
|
||||||
Channel int `json:"channel,omitempty"` // 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|183|184|185|187|188|189|192|196
|
Channel int `json:"channel,omitempty"` // 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|183|184|185|187|188|189|192|196
|
||||||
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})$
|
||||||
Timestamp int `json:"timestamp,omitempty"` // [1-9][0-9]{12}
|
Timestamp int `json:"timestamp,omitempty"` // [1-9][0-9]{12}
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelPlan_Coupling struct {
|
type ChannelPlanCoupling struct {
|
||||||
Rssi int `json:"rssi,omitempty"`
|
Rssi int `json:"rssi,omitempty"`
|
||||||
Source string `json:"source,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2}).*$
|
Source string `json:"source,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2}).*$
|
||||||
Target string `json:"target,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2}).*$
|
Target string `json:"target,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2}).*$
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelPlan_RadioTable struct {
|
type ChannelPlanRadioTable struct {
|
||||||
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
||||||
Channel string `json:"channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
Channel string `json:"channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
||||||
DeviceMAC string `json:"device_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
DeviceMAC string `json:"device_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||||
@@ -58,12 +58,12 @@ type ChannelPlan_RadioTable struct {
|
|||||||
Width int `json:"width,omitempty"` // 20|40|80|160
|
Width int `json:"width,omitempty"` // 20|40|80|160
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelPlan_SatisfactionTable struct {
|
type ChannelPlanSatisfactionTable struct {
|
||||||
DeviceMAC string `json:"device_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
DeviceMAC string `json:"device_mac,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
|
||||||
Satisfaction float64 `json:"satisfaction,omitempty"`
|
Satisfaction float64 `json:"satisfaction,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChannelPlan_SiteBlacklistedChannels struct {
|
type ChannelPlanSiteBlacklistedChannels struct {
|
||||||
Channel int `json:"channel,omitempty"` // 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|183|184|185|187|188|189|192|196
|
Channel int `json:"channel,omitempty"` // 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|183|184|185|187|188|189|192|196
|
||||||
Timestamp int `json:"timestamp,omitempty"` // [1-9][0-9]{12}
|
Timestamp int `json:"timestamp,omitempty"` // [1-9][0-9]{12}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ type Dashboard 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"`
|
||||||
|
|
||||||
ControllerVersion string `json:"controller_version,omitempty"`
|
ControllerVersion string `json:"controller_version,omitempty"`
|
||||||
Desc string `json:"desc,omitempty"`
|
Desc string `json:"desc,omitempty"`
|
||||||
IsPublic bool `json:"is_public"`
|
IsPublic bool `json:"is_public"`
|
||||||
Modules []Dashboard_Modules `json:"modules,omitempty"`
|
Modules []DashboardModules `json:"modules,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Dashboard_Modules struct {
|
type DashboardModules struct {
|
||||||
Config string `json:"config,omitempty"`
|
Config string `json:"config,omitempty"`
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
ModuleID string `json:"module_id"`
|
ModuleID string `json:"module_id"`
|
||||||
|
|||||||
@@ -23,63 +23,65 @@ type Device 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"`
|
||||||
|
|
||||||
AtfEnabled bool `json:"atf_enabled,omitempty"`
|
MAC string `json:"mac"`
|
||||||
BandsteeringMode string `json:"bandsteering_mode,omitempty"` // off|equal|prefer_5g
|
|
||||||
BaresipAuthUser string `json:"baresip_auth_user,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
AtfEnabled bool `json:"atf_enabled,omitempty"`
|
||||||
BaresipEnabled bool `json:"baresip_enabled,omitempty"`
|
BandsteeringMode string `json:"bandsteering_mode,omitempty"` // off|equal|prefer_5g
|
||||||
BaresipExtension string `json:"baresip_extension,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
BaresipAuthUser string `json:"baresip_auth_user,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
||||||
ConfigNetwork Device_ConfigNetwork `json:"config_network,omitempty"`
|
BaresipEnabled bool `json:"baresip_enabled,omitempty"`
|
||||||
DPIEnabled bool `json:"dpi_enabled,omitempty"`
|
BaresipExtension string `json:"baresip_extension,omitempty"` // ^\+?[a-zA-Z0-9_.\-!~*'()]*
|
||||||
Disabled bool `json:"disabled,omitempty"`
|
ConfigNetwork DeviceConfigNetwork `json:"config_network,omitempty"`
|
||||||
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id,omitempty"` // [\d\w]+|
|
DPIEnabled bool `json:"dpi_enabled,omitempty"`
|
||||||
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
Disabled bool `json:"disabled,omitempty"`
|
||||||
EthernetOverrides []Device_EthernetOverrides `json:"ethernet_overrides,omitempty"`
|
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id,omitempty"` // [\d\w]+|
|
||||||
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled,omitempty"`
|
||||||
HeightInMeters float64 `json:"heightInMeters,omitempty"`
|
EthernetOverrides []DeviceEthernetOverrides `json:"ethernet_overrides,omitempty"`
|
||||||
JumboframeEnabled bool `json:"jumboframe_enabled,omitempty"`
|
FlowctrlEnabled bool `json:"flowctrl_enabled,omitempty"`
|
||||||
LcmBrightness int `json:"lcm_brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
HeightInMeters float64 `json:"heightInMeters,omitempty"`
|
||||||
LcmBrightnessOverride bool `json:"lcm_brightness_override,omitempty"`
|
JumboframeEnabled bool `json:"jumboframe_enabled,omitempty"`
|
||||||
LcmIDleTimeout int `json:"lcm_idle_timeout,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-5][0-9][0-9]|3600
|
LcmBrightness int `json:"lcm_brightness,omitempty"` // [1-9]|[1-9][0-9]|100
|
||||||
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
LcmBrightnessOverride bool `json:"lcm_brightness_override,omitempty"`
|
||||||
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
LcmIDleTimeout int `json:"lcm_idle_timeout,omitempty"` // [1-9][0-9]|[1-9][0-9][0-9]|[1-2][0-9][0-9][0-9]|3[0-5][0-9][0-9]|3600
|
||||||
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
LcmIDleTimeoutOverride bool `json:"lcm_idle_timeout_override,omitempty"`
|
||||||
LedOverride string `json:"led_override,omitempty"` // default|on|off
|
LcmTrackerEnabled bool `json:"lcm_tracker_enabled,omitempty"`
|
||||||
LedOverrideColor string `json:"led_override_color,omitempty"` // ^#(?:[0-9a-fA-F]{3}){1,2}$
|
LcmTrackerSeed string `json:"lcm_tracker_seed,omitempty"` // .{0,50}
|
||||||
LedOverrideColorBrightness int `json:"led_override_color_brightness,omitempty"` // ^[0-9][0-9]?$|^100$
|
LedOverride string `json:"led_override,omitempty"` // default|on|off
|
||||||
Locked bool `json:"locked,omitempty"`
|
LedOverrideColor string `json:"led_override_color,omitempty"` // ^#(?:[0-9a-fA-F]{3}){1,2}$
|
||||||
LteApn string `json:"lte_apn,omitempty"` // .{1,128}
|
LedOverrideColorBrightness int `json:"led_override_color_brightness,omitempty"` // ^[0-9][0-9]?$|^100$
|
||||||
LteExtAnt bool `json:"lte_ext_ant,omitempty"`
|
Locked bool `json:"locked,omitempty"`
|
||||||
LtePoe bool `json:"lte_poe,omitempty"`
|
LteApn string `json:"lte_apn,omitempty"` // .{1,128}
|
||||||
LteSimPin int `json:"lte_sim_pin,omitempty"`
|
LteExtAnt bool `json:"lte_ext_ant,omitempty"`
|
||||||
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
|
LtePoe bool `json:"lte_poe,omitempty"`
|
||||||
MapID string `json:"map_id,omitempty"`
|
LteSimPin int `json:"lte_sim_pin,omitempty"`
|
||||||
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
|
LteSoftLimit int `json:"lte_soft_limit,omitempty"`
|
||||||
MgmtNetworkID string `json:"mgmt_network_id,omitempty"` // [\d\w]+
|
MapID string `json:"map_id,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
MeshStaVapEnabled bool `json:"mesh_sta_vap_enabled,omitempty"`
|
||||||
OutdoorModeOverride string `json:"outdoor_mode_override,omitempty"` // default|on|off
|
MgmtNetworkID string `json:"mgmt_network_id,omitempty"` // [\d\w]+
|
||||||
OutletEnabled bool `json:"outlet_enabled,omitempty"`
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
OutletOverrides []Device_OutletOverrides `json:"outlet_overrides,omitempty"`
|
OutdoorModeOverride string `json:"outdoor_mode_override,omitempty"` // default|on|off
|
||||||
PortOverrides []Device_PortOverrides `json:"port_overrides,omitempty"`
|
OutletEnabled bool `json:"outlet_enabled,omitempty"`
|
||||||
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
OutletOverrides []DeviceOutletOverrides `json:"outlet_overrides,omitempty"`
|
||||||
PowerSourceCtrlEnabled bool `json:"power_source_ctrl_enabled,omitempty"`
|
PortOverrides []DevicePortOverrides `json:"port_overrides,omitempty"`
|
||||||
RADIUSProfileID string `json:"radiusprofile_id,omitempty"`
|
PowerSourceCtrl string `json:"power_source_ctrl,omitempty"` // auto|8023af|8023at|8023bt-type3|8023bt-type4|pasv24|poe-injector|ac|adapter|dc|rps
|
||||||
RadioTable []Device_RadioTable `json:"radio_table,omitempty"`
|
PowerSourceCtrlEnabled bool `json:"power_source_ctrl_enabled,omitempty"`
|
||||||
ResetbtnEnabled string `json:"resetbtn_enabled,omitempty"` // on|off
|
RADIUSProfileID string `json:"radiusprofile_id,omitempty"`
|
||||||
RpsOverride Device_RpsOverride `json:"rps_override,omitempty"`
|
RadioTable []DeviceRadioTable `json:"radio_table,omitempty"`
|
||||||
SnmpContact string `json:"snmp_contact,omitempty"` // .{0,255}
|
ResetbtnEnabled string `json:"resetbtn_enabled,omitempty"` // on|off
|
||||||
SnmpLocation string `json:"snmp_location,omitempty"` // .{0,255}
|
RpsOverride DeviceRpsOverride `json:"rps_override,omitempty"`
|
||||||
StpPriority string `json:"stp_priority,omitempty"` // 0|4096|8192|12288|16384|20480|24576|28672|32768|36864|40960|45056|49152|53248|57344|61440
|
SnmpContact string `json:"snmp_contact,omitempty"` // .{0,255}
|
||||||
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
SnmpLocation string `json:"snmp_location,omitempty"` // .{0,255}
|
||||||
SwitchVLANEnabled bool `json:"switch_vlan_enabled,omitempty"`
|
StpPriority string `json:"stp_priority,omitempty"` // 0|4096|8192|12288|16384|20480|24576|28672|32768|36864|40960|45056|49152|53248|57344|61440
|
||||||
UbbPairName string `json:"ubb_pair_name,omitempty"` // .{1,128}
|
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
|
||||||
Volume int `json:"volume,omitempty"` // [0-9]|[1-9][0-9]|100
|
SwitchVLANEnabled bool `json:"switch_vlan_enabled,omitempty"`
|
||||||
WLANOverrides []Device_WLANOverrides `json:"wlan_overrides,omitempty"`
|
UbbPairName string `json:"ubb_pair_name,omitempty"` // .{1,128}
|
||||||
X int `json:"x,omitempty"`
|
Volume int `json:"volume,omitempty"` // [0-9]|[1-9][0-9]|100
|
||||||
XBaresipPassword string `json:"x_baresip_password,omitempty"` // ^[a-zA-Z0-9_.\-!~*'()]*
|
WLANOverrides []DeviceWLANOverrides `json:"wlan_overrides,omitempty"`
|
||||||
Y int `json:"y,omitempty"`
|
X float64 `json:"x,omitempty"`
|
||||||
|
XBaresipPassword string `json:"x_baresip_password,omitempty"` // ^[a-zA-Z0-9_.\-!~*'()]*
|
||||||
|
Y float64 `json:"y,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_ConfigNetwork struct {
|
type DeviceConfigNetwork struct {
|
||||||
BondingEnabled bool `json:"bonding_enabled,omitempty"`
|
BondingEnabled bool `json:"bonding_enabled,omitempty"`
|
||||||
DNS1 string `json:"dns1,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-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]))$|^$
|
DNS1 string `json:"dns1,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-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]))$|^$
|
||||||
DNS2 string `json:"dns2,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-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]))$|^$
|
DNS2 string `json:"dns2,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-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]))$|^$
|
||||||
@@ -90,19 +92,19 @@ type Device_ConfigNetwork struct {
|
|||||||
Type string `json:"type,omitempty"` // dhcp|static
|
Type string `json:"type,omitempty"` // dhcp|static
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_EthernetOverrides struct {
|
type DeviceEthernetOverrides struct {
|
||||||
Ifname string `json:"ifname,omitempty"` // eth[0-9]{1,2}
|
Ifname string `json:"ifname,omitempty"` // eth[0-9]{1,2}
|
||||||
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?|WAN[2]?
|
NetworkGroup string `json:"networkgroup,omitempty"` // LAN[2-8]?|WAN[2]?
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_OutletOverrides struct {
|
type DeviceOutletOverrides struct {
|
||||||
CycleEnabled bool `json:"cycle_enabled,omitempty"`
|
CycleEnabled bool `json:"cycle_enabled,omitempty"`
|
||||||
Index int `json:"index,omitempty"`
|
Index int `json:"index,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{0,128}
|
Name string `json:"name,omitempty"` // .{0,128}
|
||||||
RelayState bool `json:"relay_state,omitempty"`
|
RelayState bool `json:"relay_state,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_PortOverrides struct {
|
type DevicePortOverrides struct {
|
||||||
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-6]
|
AggregateNumPorts int `json:"aggregate_num_ports,omitempty"` // [2-6]
|
||||||
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
|
||||||
@@ -139,37 +141,37 @@ type Device_PortOverrides struct {
|
|||||||
StpPortMode bool `json:"stp_port_mode,omitempty"`
|
StpPortMode bool `json:"stp_port_mode,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_RadioTable struct {
|
type DeviceRadioTable struct {
|
||||||
AntennaGain int `json:"antenna_gain,omitempty"` // ^-?([0-9]|[1-9][0-9])
|
AntennaGain int `json:"antenna_gain,omitempty"` // ^-?([0-9]|[1-9][0-9])
|
||||||
AntennaID int `json:"antenna_id,omitempty"` // -1|[0-9]
|
AntennaID int `json:"antenna_id,omitempty"` // -1|[0-9]
|
||||||
BackupChannel string `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
BackupChannel int `json:"backup_channel,omitempty"` // [0-9]|[1][0-4]|16|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|183|184|185|187|188|189|192|196|auto
|
||||||
Channel string `json:"channel,omitempty"` // [0-9]|[1][0-4]|4.5|16|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|183|184|185|187|188|189|192|196|auto
|
Channel int `json:"channel,omitempty"` // [0-9]|[1][0-4]|4.5|16|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|183|184|185|187|188|189|192|196|auto
|
||||||
HardNoiseFloorEnabled bool `json:"hard_noise_floor_enabled,omitempty"`
|
HardNoiseFloorEnabled bool `json:"hard_noise_floor_enabled,omitempty"`
|
||||||
Ht int `json:"ht,omitempty"` // 20|40|80|160|1080|2160
|
Ht string `json:"ht,omitempty"` // 20|40|80|160|1080|2160
|
||||||
MinRssi int `json:"min_rssi,omitempty"` // ^-([1-9]|[1-8][0-9]|9[0-4])$
|
MinRssi int `json:"min_rssi,omitempty"` // ^-([1-9]|[1-8][0-9]|9[0-4])$
|
||||||
MinRssiEnabled bool `json:"min_rssi_enabled,omitempty"`
|
MinRssiEnabled bool `json:"min_rssi_enabled,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Radio string `json:"radio,omitempty"` // ng|na|ad
|
Radio string `json:"radio,omitempty"` // ng|na|ad
|
||||||
SensLevel int `json:"sens_level,omitempty"` // ^-([5-8][0-9]|90)$
|
SensLevel int `json:"sens_level,omitempty"` // ^-([5-8][0-9]|90)$
|
||||||
SensLevelEnabled bool `json:"sens_level_enabled,omitempty"`
|
SensLevelEnabled bool `json:"sens_level_enabled,omitempty"`
|
||||||
TxPower string `json:"tx_power,omitempty"` // [\d]+|auto
|
TxPower int `json:"tx_power,omitempty"` // [\d]+|auto
|
||||||
TxPowerMode string `json:"tx_power_mode,omitempty"` // auto|medium|high|low|custom
|
TxPowerMode string `json:"tx_power_mode,omitempty"` // auto|medium|high|low|custom
|
||||||
VwireEnabled bool `json:"vwire_enabled,omitempty"`
|
VwireEnabled bool `json:"vwire_enabled,omitempty"`
|
||||||
WLANGroupID string `json:"wlangroup_id,omitempty"` // [\d\w]+
|
WLANGroupID string `json:"wlangroup_id,omitempty"` // [\d\w]+
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_RpsOverride struct {
|
type DeviceRpsOverride struct {
|
||||||
PowerManagementMode string `json:"power_management_mode,omitempty"` // dynamic|static
|
PowerManagementMode string `json:"power_management_mode,omitempty"` // dynamic|static
|
||||||
RpsPortTable []Device_RpsPortTable `json:"rps_port_table,omitempty"`
|
RpsPortTable []DeviceRpsPortTable `json:"rps_port_table,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_RpsPortTable struct {
|
type DeviceRpsPortTable struct {
|
||||||
Name string `json:"name,omitempty"` // .{0,32}
|
Name string `json:"name,omitempty"` // .{0,32}
|
||||||
PortIDX int `json:"port_idx,omitempty"` // [1-6]
|
PortIDX int `json:"port_idx,omitempty"` // [1-6]
|
||||||
PortMode string `json:"port_mode,omitempty"` // auto|force_active|manual|disabled
|
PortMode string `json:"port_mode,omitempty"` // auto|force_active|manual|disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
type Device_WLANOverrides struct {
|
type DeviceWLANOverrides struct {
|
||||||
Enabled bool `json:"enabled,omitempty"`
|
Enabled bool `json:"enabled,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,32}
|
Name string `json:"name,omitempty"` // .{1,32}
|
||||||
NameCombineEnabled bool `json:"name_combine_enabled,omitempty"`
|
NameCombineEnabled bool `json:"name_combine_enabled,omitempty"`
|
||||||
|
|||||||
@@ -23,85 +23,85 @@ type Hotspot2Conf 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"`
|
||||||
|
|
||||||
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]|$
|
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"`
|
Capab []Hotspot2ConfCapab `json:"capab,omitempty"`
|
||||||
CellularNetworkList []Hotspot2Conf_CellularNetworkList `json:"cellular_network_list,omitempty"`
|
CellularNetworkList []Hotspot2ConfCellularNetworkList `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
|
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"`
|
DisableDgaf bool `json:"disable_dgaf"`
|
||||||
DomainNameList []string `json:"domain_name_list,omitempty"` // .{1,128}
|
DomainNameList []string `json:"domain_name_list,omitempty"` // .{1,128}
|
||||||
FriendlyName []Hotspot2Conf_FriendlyName `json:"friendly_name,omitempty"`
|
FriendlyName []Hotspot2ConfFriendlyName `json:"friendly_name,omitempty"`
|
||||||
GasAdvanced bool `json:"gas_advanced"`
|
GasAdvanced bool `json:"gas_advanced"`
|
||||||
GasComebackDelay int `json:"gas_comeback_delay,omitempty"`
|
GasComebackDelay int `json:"gas_comeback_delay,omitempty"`
|
||||||
GasFragLimit int `json:"gas_frag_limit,omitempty"`
|
GasFragLimit int `json:"gas_frag_limit,omitempty"`
|
||||||
Hessid string `json:"hessid"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$|^$
|
Hessid string `json:"hessid"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$|^$
|
||||||
HessidUsed bool `json:"hessid_used"`
|
HessidUsed bool `json:"hessid_used"`
|
||||||
IPaddrTypeAvailV4 int `json:"ipaddr_type_avail_v4,omitempty"` // 0|1|2|3|4|5|6|7
|
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
|
IPaddrTypeAvailV6 int `json:"ipaddr_type_avail_v6,omitempty"` // 0|1|2
|
||||||
Icons []Hotspot2Conf_Icons `json:"icons,omitempty"`
|
Icons []Hotspot2ConfIcons `json:"icons,omitempty"`
|
||||||
MetricsDownlinkLoad int `json:"metrics_downlink_load,omitempty"`
|
MetricsDownlinkLoad int `json:"metrics_downlink_load,omitempty"`
|
||||||
MetricsDownlinkLoadSet bool `json:"metrics_downlink_load_set"`
|
MetricsDownlinkLoadSet bool `json:"metrics_downlink_load_set"`
|
||||||
MetricsDownlinkSpeed int `json:"metrics_downlink_speed,omitempty"`
|
MetricsDownlinkSpeed int `json:"metrics_downlink_speed,omitempty"`
|
||||||
MetricsDownlinkSpeedSet bool `json:"metrics_downlink_speed_set"`
|
MetricsDownlinkSpeedSet bool `json:"metrics_downlink_speed_set"`
|
||||||
MetricsInfoAtCapacity bool `json:"metrics_info_at_capacity"`
|
MetricsInfoAtCapacity bool `json:"metrics_info_at_capacity"`
|
||||||
MetricsInfoLinkStatus string `json:"metrics_info_link_status,omitempty"` // up|down|test
|
MetricsInfoLinkStatus string `json:"metrics_info_link_status,omitempty"` // up|down|test
|
||||||
MetricsInfoSymmetric bool `json:"metrics_info_symmetric"`
|
MetricsInfoSymmetric bool `json:"metrics_info_symmetric"`
|
||||||
MetricsMeasurement int `json:"metrics_measurement,omitempty"`
|
MetricsMeasurement int `json:"metrics_measurement,omitempty"`
|
||||||
MetricsMeasurementSet bool `json:"metrics_measurement_set"`
|
MetricsMeasurementSet bool `json:"metrics_measurement_set"`
|
||||||
MetricsStatus bool `json:"metrics_status"`
|
MetricsStatus bool `json:"metrics_status"`
|
||||||
MetricsUplinkLoad int `json:"metrics_uplink_load,omitempty"`
|
MetricsUplinkLoad int `json:"metrics_uplink_load,omitempty"`
|
||||||
MetricsUplinkLoadSet bool `json:"metrics_uplink_load_set"`
|
MetricsUplinkLoadSet bool `json:"metrics_uplink_load_set"`
|
||||||
MetricsUplinkSpeed int `json:"metrics_uplink_speed,omitempty"`
|
MetricsUplinkSpeed int `json:"metrics_uplink_speed,omitempty"`
|
||||||
MetricsUplinkSpeedSet bool `json:"metrics_uplink_speed_set"`
|
MetricsUplinkSpeedSet bool `json:"metrics_uplink_speed_set"`
|
||||||
NaiRealmList []Hotspot2Conf_NaiRealmList `json:"nai_realm_list,omitempty"`
|
NaiRealmList []Hotspot2ConfNaiRealmList `json:"nai_realm_list,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
NetworkAccessAsra bool `json:"network_access_asra"`
|
NetworkAccessAsra bool `json:"network_access_asra"`
|
||||||
NetworkAccessEsr bool `json:"network_access_esr"`
|
NetworkAccessEsr bool `json:"network_access_esr"`
|
||||||
NetworkAccessInternet bool `json:"network_access_internet"`
|
NetworkAccessInternet bool `json:"network_access_internet"`
|
||||||
NetworkAccessUesa bool `json:"network_access_uesa"`
|
NetworkAccessUesa bool `json:"network_access_uesa"`
|
||||||
NetworkAuthType int `json:"network_auth_type,omitempty"` // -1|0|1|2|3
|
NetworkAuthType int `json:"network_auth_type,omitempty"` // -1|0|1|2|3
|
||||||
NetworkAuthUrl string `json:"network_auth_url,omitempty"`
|
NetworkAuthUrl string `json:"network_auth_url,omitempty"`
|
||||||
NetworkType int `json:"network_type,omitempty"` // 0|1|2|3|4|5|14|15
|
NetworkType int `json:"network_type,omitempty"` // 0|1|2|3|4|5|14|15
|
||||||
Osu []Hotspot2Conf_Osu `json:"osu,omitempty"`
|
Osu []Hotspot2ConfOsu `json:"osu,omitempty"`
|
||||||
OsuSSID string `json:"osu_ssid"`
|
OsuSSID string `json:"osu_ssid"`
|
||||||
QOSMapDcsp []Hotspot2Conf_QOSMapDcsp `json:"qos_map_dcsp,omitempty"`
|
QOSMapDcsp []Hotspot2ConfQOSMapDcsp `json:"qos_map_dcsp,omitempty"`
|
||||||
QOSMapExceptions []Hotspot2Conf_QOSMapExceptions `json:"qos_map_exceptions,omitempty"`
|
QOSMapExceptions []Hotspot2ConfQOSMapExceptions `json:"qos_map_exceptions,omitempty"`
|
||||||
QOSMapStatus bool `json:"qos_map_status"`
|
QOSMapStatus bool `json:"qos_map_status"`
|
||||||
RoamingConsortiumList []Hotspot2Conf_RoamingConsortiumList `json:"roaming_consortium_list,omitempty"`
|
RoamingConsortiumList []Hotspot2ConfRoamingConsortiumList `json:"roaming_consortium_list,omitempty"`
|
||||||
SaveTimestamp string `json:"save_timestamp,omitempty"`
|
SaveTimestamp string `json:"save_timestamp,omitempty"`
|
||||||
TCFilename string `json:"t_c_filename,omitempty"` // .{1,256}
|
TCFilename string `json:"t_c_filename,omitempty"` // .{1,256}
|
||||||
TCTimestamp int `json:"t_c_timestamp,omitempty"`
|
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
|
VenueGroup int `json:"venue_group,omitempty"` // 0|1|2|3|4|5|6|7|8|9|10|11
|
||||||
VenueName []Hotspot2Conf_VenueName `json:"venue_name,omitempty"`
|
VenueName []Hotspot2ConfVenueName `json:"venue_name,omitempty"`
|
||||||
VenueType int `json:"venue_type,omitempty"` // 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15
|
VenueType int `json:"venue_type,omitempty"` // 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_Capab struct {
|
type Hotspot2ConfCapab struct {
|
||||||
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])|$
|
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
|
Protocol string `json:"protocol,omitempty"` // icmp|tcp_udp|tcp|udp|esp
|
||||||
Status string `json:"status,omitempty"` // closed|open|unknown
|
Status string `json:"status,omitempty"` // closed|open|unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_CellularNetworkList struct {
|
type Hotspot2ConfCellularNetworkList struct {
|
||||||
Mcc int `json:"mcc,omitempty"`
|
Mcc int `json:"mcc,omitempty"`
|
||||||
Mnc int `json:"mnc,omitempty"`
|
Mnc int `json:"mnc,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_Description struct {
|
type Hotspot2ConfDescription struct {
|
||||||
Language string `json:"language,omitempty"` // [a-z]{3}
|
Language string `json:"language,omitempty"` // [a-z]{3}
|
||||||
Text string `json:"text,omitempty"` // .{1,128}
|
Text string `json:"text,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_FriendlyName struct {
|
type Hotspot2ConfFriendlyName struct {
|
||||||
Language string `json:"language,omitempty"` // [a-z]{3}
|
Language string `json:"language,omitempty"` // [a-z]{3}
|
||||||
Text string `json:"text,omitempty"` // .{1,128}
|
Text string `json:"text,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_Icon struct {
|
type Hotspot2ConfIcon struct {
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_Icons struct {
|
type Hotspot2ConfIcons struct {
|
||||||
Data string `json:"data,omitempty"`
|
Data string `json:"data,omitempty"`
|
||||||
Filename string `json:"filename,omitempty"` // .{1,256}
|
Filename string `json:"filename,omitempty"` // .{1,256}
|
||||||
Height int `json:"height,omitempty"`
|
Height int `json:"height,omitempty"`
|
||||||
@@ -112,7 +112,7 @@ type Hotspot2Conf_Icons struct {
|
|||||||
Width int `json:"width,omitempty"`
|
Width int `json:"width,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_NaiRealmList struct {
|
type Hotspot2ConfNaiRealmList struct {
|
||||||
AuthIDs string `json:"auth_ids,omitempty"`
|
AuthIDs string `json:"auth_ids,omitempty"`
|
||||||
AuthVals string `json:"auth_vals,omitempty"`
|
AuthVals string `json:"auth_vals,omitempty"`
|
||||||
EapMethod int `json:"eap_method,omitempty"` // 13|21|18|23|50
|
EapMethod int `json:"eap_method,omitempty"` // 13|21|18|23|50
|
||||||
@@ -121,34 +121,34 @@ type Hotspot2Conf_NaiRealmList struct {
|
|||||||
Status bool `json:"status"`
|
Status bool `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_Osu struct {
|
type Hotspot2ConfOsu struct {
|
||||||
Description []Hotspot2Conf_Description `json:"description,omitempty"`
|
Description []Hotspot2ConfDescription `json:"description,omitempty"`
|
||||||
FriendlyName []Hotspot2Conf_FriendlyName `json:"friendly_name,omitempty"`
|
FriendlyName []Hotspot2ConfFriendlyName `json:"friendly_name,omitempty"`
|
||||||
Icon []Hotspot2Conf_Icon `json:"icon,omitempty"`
|
Icon []Hotspot2ConfIcon `json:"icon,omitempty"`
|
||||||
MethodOmaDm bool `json:"method_oma_dm"`
|
MethodOmaDm bool `json:"method_oma_dm"`
|
||||||
MethodSoapXmlSpp bool `json:"method_soap_xml_spp"`
|
MethodSoapXmlSpp bool `json:"method_soap_xml_spp"`
|
||||||
Nai string `json:"nai,omitempty"`
|
Nai string `json:"nai,omitempty"`
|
||||||
Nai2 string `json:"nai2,omitempty"`
|
Nai2 string `json:"nai2,omitempty"`
|
||||||
OperatingClass string `json:"operating_class,omitempty"` // [0-9A-Fa-f]{12}
|
OperatingClass string `json:"operating_class,omitempty"` // [0-9A-Fa-f]{12}
|
||||||
ServerUri string `json:"server_uri,omitempty"`
|
ServerUri string `json:"server_uri,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_QOSMapDcsp struct {
|
type Hotspot2ConfQOSMapDcsp struct {
|
||||||
High int `json:"high,omitempty"`
|
High int `json:"high,omitempty"`
|
||||||
Low int `json:"low,omitempty"`
|
Low int `json:"low,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_QOSMapExceptions struct {
|
type Hotspot2ConfQOSMapExceptions struct {
|
||||||
Dcsp int `json:"dcsp,omitempty"`
|
Dcsp int `json:"dcsp,omitempty"`
|
||||||
Up int `json:"up,omitempty"` // [0-7]
|
Up int `json:"up,omitempty"` // [0-7]
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_RoamingConsortiumList struct {
|
type Hotspot2ConfRoamingConsortiumList struct {
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
Oid string `json:"oid,omitempty"` // .{1,128}
|
Oid string `json:"oid,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Hotspot2Conf_VenueName struct {
|
type Hotspot2ConfVenueName struct {
|
||||||
Language string `json:"language,omitempty"` // [a-z]{3}
|
Language string `json:"language,omitempty"` // [a-z]{3}
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Url string `json:"url,omitempty"`
|
Url string `json:"url,omitempty"`
|
||||||
|
|||||||
@@ -23,148 +23,148 @@ type Network 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"`
|
||||||
|
|
||||||
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}|^$
|
||||||
DHCPDDNS1 string `json:"dhcpd_dns_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDDNS1 string `json:"dhcpd_dns_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDDNS2 string `json:"dhcpd_dns_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDDNS2 string `json:"dhcpd_dns_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDDNS3 string `json:"dhcpd_dns_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDDNS3 string `json:"dhcpd_dns_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDDNS4 string `json:"dhcpd_dns_4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDDNS4 string `json:"dhcpd_dns_4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDDNSEnabled bool `json:"dhcpd_dns_enabled"`
|
DHCPDDNSEnabled bool `json:"dhcpd_dns_enabled"`
|
||||||
DHCPDEnabled bool `json:"dhcpd_enabled"`
|
DHCPDEnabled bool `json:"dhcpd_enabled"`
|
||||||
DHCPDGateway string `json:"dhcpd_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDGateway string `json:"dhcpd_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDGatewayEnabled bool `json:"dhcpd_gateway_enabled"`
|
DHCPDGatewayEnabled bool `json:"dhcpd_gateway_enabled"`
|
||||||
DHCPDIP1 string `json:"dhcpd_ip_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDIP1 string `json:"dhcpd_ip_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDIP2 string `json:"dhcpd_ip_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDIP2 string `json:"dhcpd_ip_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDIP3 string `json:"dhcpd_ip_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDIP3 string `json:"dhcpd_ip_3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDLeaseTime int `json:"dhcpd_leasetime,omitempty"`
|
DHCPDLeaseTime int `json:"dhcpd_leasetime,omitempty"`
|
||||||
DHCPDMAC1 string `json:"dhcpd_mac_1"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
DHCPDMAC1 string `json:"dhcpd_mac_1"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||||
DHCPDMAC2 string `json:"dhcpd_mac_2"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
DHCPDMAC2 string `json:"dhcpd_mac_2"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||||
DHCPDMAC3 string `json:"dhcpd_mac_3"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
DHCPDMAC3 string `json:"dhcpd_mac_3"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||||
DHCPDNtp1 string `json:"dhcpd_ntp_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDNtp1 string `json:"dhcpd_ntp_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDNtp2 string `json:"dhcpd_ntp_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDNtp2 string `json:"dhcpd_ntp_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDNtpEnabled bool `json:"dhcpd_ntp_enabled"`
|
DHCPDNtpEnabled bool `json:"dhcpd_ntp_enabled"`
|
||||||
DHCPDStart string `json:"dhcpd_start"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDStart string `json:"dhcpd_start"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDStop string `json:"dhcpd_stop"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDStop string `json:"dhcpd_stop"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDTFTPServer string `json:"dhcpd_tftp_server,omitempty"`
|
DHCPDTFTPServer string `json:"dhcpd_tftp_server,omitempty"`
|
||||||
DHCPDTimeOffset int `json:"dhcpd_time_offset,omitempty"` // ^0$|^-?([1-9]([0-9]{1,3})?|[1-7][0-9]{4}|[8][0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
DHCPDTimeOffset int `json:"dhcpd_time_offset,omitempty"` // ^0$|^-?([1-9]([0-9]{1,3})?|[1-7][0-9]{4}|[8][0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$
|
||||||
DHCPDTimeOffsetEnabled bool `json:"dhcpd_time_offset_enabled"`
|
DHCPDTimeOffsetEnabled bool `json:"dhcpd_time_offset_enabled"`
|
||||||
DHCPDUnifiController string `json:"dhcpd_unifi_controller"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDUnifiController string `json:"dhcpd_unifi_controller"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDV6DNS1 string `json:"dhcpdv6_dns_1,omitempty"`
|
DHCPDV6DNS1 string `json:"dhcpdv6_dns_1,omitempty"`
|
||||||
DHCPDV6DNS2 string `json:"dhcpdv6_dns_2,omitempty"`
|
DHCPDV6DNS2 string `json:"dhcpdv6_dns_2,omitempty"`
|
||||||
DHCPDV6DNS3 string `json:"dhcpdv6_dns_3,omitempty"`
|
DHCPDV6DNS3 string `json:"dhcpdv6_dns_3,omitempty"`
|
||||||
DHCPDV6DNS4 string `json:"dhcpdv6_dns_4,omitempty"`
|
DHCPDV6DNS4 string `json:"dhcpdv6_dns_4,omitempty"`
|
||||||
DHCPDV6DNSAuto bool `json:"dhcpdv6_dns_auto"`
|
DHCPDV6DNSAuto bool `json:"dhcpdv6_dns_auto"`
|
||||||
DHCPDV6Enabled bool `json:"dhcpdv6_enabled"`
|
DHCPDV6Enabled bool `json:"dhcpdv6_enabled"`
|
||||||
DHCPDV6LeaseTime int `json:"dhcpdv6_leasetime,omitempty"`
|
DHCPDV6LeaseTime int `json:"dhcpdv6_leasetime,omitempty"`
|
||||||
DHCPDV6Start string `json:"dhcpdv6_start,omitempty"`
|
DHCPDV6Start string `json:"dhcpdv6_start,omitempty"`
|
||||||
DHCPDV6Stop string `json:"dhcpdv6_stop,omitempty"`
|
DHCPDV6Stop string `json:"dhcpdv6_stop,omitempty"`
|
||||||
DHCPDWPAdUrl string `json:"dhcpd_wpad_url,omitempty"`
|
DHCPDWPAdUrl string `json:"dhcpd_wpad_url,omitempty"`
|
||||||
DHCPDWins1 string `json:"dhcpd_wins_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDWins1 string `json:"dhcpd_wins_1"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDWins2 string `json:"dhcpd_wins_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
DHCPDWins2 string `json:"dhcpd_wins_2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
DHCPDWinsEnabled bool `json:"dhcpd_wins_enabled"`
|
DHCPDWinsEnabled bool `json:"dhcpd_wins_enabled"`
|
||||||
DHCPRelayEnabled bool `json:"dhcp_relay_enabled"`
|
DHCPRelayEnabled bool `json:"dhcp_relay_enabled"`
|
||||||
DHCPguardEnabled bool `json:"dhcpguard_enabled"`
|
DHCPguardEnabled bool `json:"dhcpguard_enabled"`
|
||||||
DPIEnabled bool `json:"dpi_enabled"`
|
DPIEnabled bool `json:"dpi_enabled"`
|
||||||
DPIgroupID string `json:"dpigroup_id"` // [\d\w]+|^$
|
DPIgroupID string `json:"dpigroup_id"` // [\d\w]+|^$
|
||||||
DomainName string `json:"domain_name"` // (?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^$|[a-zA-Z0-9-]{1,63}
|
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"`
|
Enabled bool `json:"enabled"`
|
||||||
ExposedToSiteVPN bool `json:"exposed_to_site_vpn"`
|
ExposedToSiteVPN bool `json:"exposed_to_site_vpn"`
|
||||||
GatewayDevice string `json:"gateway_device"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
GatewayDevice string `json:"gateway_device"` // (^$|^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$)
|
||||||
GatewayType string `json:"gateway_type,omitempty"` // default|switch
|
GatewayType string `json:"gateway_type,omitempty"` // default|switch
|
||||||
IGMPFastleave bool `json:"igmp_fastleave"`
|
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|^$
|
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])$|^$
|
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
|
||||||
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
|
||||||
IPSecKeyExchange string `json:"ipsec_key_exchange,omitempty"` // ikev1|ikev2
|
IPSecKeyExchange string `json:"ipsec_key_exchange,omitempty"` // ikev1|ikev2
|
||||||
IPSecLocalIP string `json:"ipsec_local_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
IPSecLocalIP string `json:"ipsec_local_ip,omitempty"` // ^any$|^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||||
IPSecPeerIP string `json:"ipsec_peer_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
IPSecPeerIP string `json:"ipsec_peer_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||||
IPSecPfs bool `json:"ipsec_pfs"`
|
IPSecPfs bool `json:"ipsec_pfs"`
|
||||||
IPSecProfile string `json:"ipsec_profile,omitempty"` // customized|azure_dynamic|azure_static
|
IPSecProfile string `json:"ipsec_profile,omitempty"` // customized|azure_dynamic|azure_static
|
||||||
IPSubnet string `json:"ip_subnet,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
IPSubnet string `json:"ip_subnet,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$
|
||||||
IPV6InterfaceType string `json:"ipv6_interface_type,omitempty"` // static|pd|none
|
IPV6InterfaceType string `json:"ipv6_interface_type,omitempty"` // static|pd|none
|
||||||
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty"` // wan|wan2
|
IPV6PDInterface string `json:"ipv6_pd_interface,omitempty"` // wan|wan2
|
||||||
IPV6PDPrefixid string `json:"ipv6_pd_prefixid"` // ^$|[a-fA-F0-9]{1,4}
|
IPV6PDPrefixid string `json:"ipv6_pd_prefixid"` // ^$|[a-fA-F0-9]{1,4}
|
||||||
IPV6PDStart string `json:"ipv6_pd_start,omitempty"`
|
IPV6PDStart string `json:"ipv6_pd_start,omitempty"`
|
||||||
IPV6PDStop string `json:"ipv6_pd_stop,omitempty"`
|
IPV6PDStop string `json:"ipv6_pd_stop,omitempty"`
|
||||||
IPV6RaEnabled bool `json:"ipv6_ra_enabled"`
|
IPV6RaEnabled bool `json:"ipv6_ra_enabled"`
|
||||||
IPV6RaPreferredLifetime int `json:"ipv6_ra_preferred_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
IPV6RaPreferredLifetime int `json:"ipv6_ra_preferred_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
||||||
IPV6RaPriority string `json:"ipv6_ra_priority,omitempty"` // high|medium|low
|
IPV6RaPriority string `json:"ipv6_ra_priority,omitempty"` // high|medium|low
|
||||||
IPV6RaValidLifetime int `json:"ipv6_ra_valid_lifetime,omitempty"` // ^([0-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-8][0-9]{4}|9[0-8][0-9]{3}|99[0-8][0-9]{2}|999[0-8][0-9]|9999[0-9]|[1-8][0-9]{5}|9[0-8][0-9]{4}|99[0-8][0-9]{3}|999[0-8][0-9]{2}|9999[0-8][0-9]|99999[0-9]|[1-8][0-9]{6}|9[0-8][0-9]{5}|99[0-8][0-9]{4}|999[0-8][0-9]{3}|9999[0-8][0-9]{2}|99999[0-8][0-9]|999999[0-9]|[12][0-9]{7}|30[0-9]{6}|31[0-4][0-9]{5}|315[0-2][0-9]{4}|3153[0-5][0-9]{3}|31536000)$|^$
|
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"`
|
||||||
IsNAT bool `json:"is_nat"`
|
IsNAT bool `json:"is_nat"`
|
||||||
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan|wan2
|
L2TpInterface string `json:"l2tp_interface,omitempty"` // wan|wan2
|
||||||
LteLanEnabled bool `json:"lte_lan_enabled"`
|
LteLanEnabled bool `json:"lte_lan_enabled"`
|
||||||
NATOutboundIP string `json:"nat_outbound_ip,omitempty"`
|
NATOutboundIP string `json:"nat_outbound_ip,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]?
|
||||||
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])$
|
||||||
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])$
|
||||||
OpenVPNRemotePort int `json:"openvpn_remote_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
OpenVPNRemotePort int `json:"openvpn_remote_port,omitempty"` // ^([1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-4][0-9]{3}|[6][5][0-4][0-9]{2}|[6][5][5][0-2][0-9]|[6][5][5][3][0-5])$
|
||||||
PptpcRequireMppe bool `json:"pptpc_require_mppe"`
|
PptpcRequireMppe bool `json:"pptpc_require_mppe"`
|
||||||
PptpcRouteDistance int `json:"pptpc_route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
PptpcRouteDistance int `json:"pptpc_route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||||
PptpcServerIP string `json:"pptpc_server_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^[a-zA-Z0-9-]{1,63}$
|
PptpcServerIP string `json:"pptpc_server_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|(?=^.{3,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)|^[a-zA-Z0-9-]{1,63}$
|
||||||
PptpcUsername string `json:"pptpc_username,omitempty"` // [^\"\' ]+
|
PptpcUsername string `json:"pptpc_username,omitempty"` // [^\"\' ]+
|
||||||
Priority int `json:"priority,omitempty"` // [1-4]
|
Priority int `json:"priority,omitempty"` // [1-4]
|
||||||
Purpose string `json:"purpose,omitempty"` // corporate|guest|remote-user-vpn|site-vpn|vlan-only|vpn-client|wan
|
Purpose string `json:"purpose,omitempty"` // corporate|guest|remote-user-vpn|site-vpn|vlan-only|vpn-client|wan
|
||||||
RADIUSProfileID string `json:"radiusprofile_id"`
|
RADIUSProfileID string `json:"radiusprofile_id"`
|
||||||
RemoteSiteID string `json:"remote_site_id"`
|
RemoteSiteID string `json:"remote_site_id"`
|
||||||
RemoteSiteSubnets []string `json:"remote_site_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
RemoteSiteSubnets []string `json:"remote_site_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
||||||
RemoteVPNSubnets []string `json:"remote_vpn_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
RemoteVPNSubnets []string `json:"remote_vpn_subnets,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2][0-9]|30)$|^$
|
||||||
ReportWANEvent bool `json:"report_wan_event"`
|
ReportWANEvent bool `json:"report_wan_event"`
|
||||||
RequireMschapv2 bool `json:"require_mschapv2"`
|
RequireMschapv2 bool `json:"require_mschapv2"`
|
||||||
RouteDistance int `json:"route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
RouteDistance int `json:"route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
|
||||||
UpnpLanEnabled bool `json:"upnp_lan_enabled"`
|
UpnpLanEnabled bool `json:"upnp_lan_enabled"`
|
||||||
UserGroupID string `json:"usergroup_id"`
|
UserGroupID string `json:"usergroup_id"`
|
||||||
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|400[0-9]|^$
|
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|400[0-9]|^$
|
||||||
VLANEnabled bool `json:"vlan_enabled"`
|
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-vpn|pptp-client|l2tp-server|pptp-server|uid-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"`
|
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])$|^$
|
||||||
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])$|^$
|
WANDNS2 string `json:"wan_dns2"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
WANDNS3 string `json:"wan_dns3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
WANDNS3 string `json:"wan_dns3"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
WANDNS4 string `json:"wan_dns4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
WANDNS4 string `json:"wan_dns4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
WANEgressQOS int `json:"wan_egress_qos,omitempty"` // [1-7]|^$
|
WANEgressQOS int `json:"wan_egress_qos,omitempty"` // [1-7]|^$
|
||||||
WANGateway string `json:"wan_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
WANGateway string `json:"wan_gateway"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$
|
||||||
WANGatewayV6 string `json:"wan_gateway_v6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
WANGatewayV6 string `json:"wan_gateway_v6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||||
WANIP string `json:"wan_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
WANIP string `json:"wan_ip,omitempty"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
|
||||||
WANIPV6 string `json:"wan_ipv6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
WANIPV6 string `json:"wan_ipv6"` // ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$|^$
|
||||||
WANLoadBalanceType string `json:"wan_load_balance_type,omitempty"` // failover-only|weighted
|
WANLoadBalanceType string `json:"wan_load_balance_type,omitempty"` // failover-only|weighted
|
||||||
WANLoadBalanceWeight int `json:"wan_load_balance_weight,omitempty"` // [1-9]|[1-9][0-9]
|
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)))))$
|
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]?|WAN_LTE_FAILOVER
|
||||||
WANPrefixlen int `json:"wan_prefixlen,omitempty"` // ^([1-9]|[1-8][0-9]|9[0-9]|1[01][0-9]|12[0-8])$|^$
|
WANPrefixlen int `json:"wan_prefixlen,omitempty"` // ^([1-9]|[1-8][0-9]|9[0-9]|1[01][0-9]|12[0-8])$|^$
|
||||||
WANSmartqDownRate int `json:"wan_smartq_down_rate,omitempty"` // [0-9]{1,6}|1000000
|
WANSmartqDownRate int `json:"wan_smartq_down_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||||
WANSmartqEnabled bool `json:"wan_smartq_enabled"`
|
WANSmartqEnabled bool `json:"wan_smartq_enabled"`
|
||||||
WANSmartqUpRate int `json:"wan_smartq_up_rate,omitempty"` // [0-9]{1,6}|1000000
|
WANSmartqUpRate int `json:"wan_smartq_up_rate,omitempty"` // [0-9]{1,6}|1000000
|
||||||
WANType string `json:"wan_type,omitempty"` // disabled|dhcp|static|pppoe
|
WANType string `json:"wan_type,omitempty"` // disabled|dhcp|static|pppoe
|
||||||
WANTypeV6 string `json:"wan_type_v6,omitempty"` // disabled|dhcpv6|static
|
WANTypeV6 string `json:"wan_type_v6,omitempty"` // disabled|dhcpv6|static
|
||||||
WANUsername string `json:"wan_username,omitempty"` // [^"' ]+
|
WANUsername string `json:"wan_username,omitempty"` // [^"' ]+
|
||||||
WANVLAN int `json:"wan_vlan,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-4]|^$
|
WANVLAN int `json:"wan_vlan,omitempty"` // [0-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-4]|^$
|
||||||
WANVLANEnabled bool `json:"wan_vlan_enabled"`
|
WANVLANEnabled bool `json:"wan_vlan_enabled"`
|
||||||
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
XIPSecPreSharedKey string `json:"x_ipsec_pre_shared_key,omitempty"` // [^\"\' ]+
|
||||||
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
XOpenVPNSharedSecretKey string `json:"x_openvpn_shared_secret_key,omitempty"` // [0-9A-Fa-f]{512}
|
||||||
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
XPptpcPassword string `json:"x_pptpc_password,omitempty"` // [^\"\' ]+
|
||||||
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
|
XWANPassword string `json:"x_wan_password,omitempty"` // [^"' ]+
|
||||||
}
|
}
|
||||||
|
|
||||||
type Network_WANDHCPOptions struct {
|
type NetworkWANDHCPOptions 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])
|
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"`
|
Value string `json:"value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,25 +23,25 @@ type RADIUSProfile 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"`
|
||||||
|
|
||||||
AccountingEnabled bool `json:"accounting_enabled"`
|
AccountingEnabled bool `json:"accounting_enabled"`
|
||||||
AcctServers []RADIUSProfile_AcctServers `json:"acct_servers,omitempty"`
|
AcctServers []RADIUSProfileAcctServers `json:"acct_servers,omitempty"`
|
||||||
AuthServers []RADIUSProfile_AuthServers `json:"auth_servers,omitempty"`
|
AuthServers []RADIUSProfileAuthServers `json:"auth_servers,omitempty"`
|
||||||
InterimUpdateEnabled bool `json:"interim_update_enabled"`
|
InterimUpdateEnabled bool `json:"interim_update_enabled"`
|
||||||
InterimUpdateInterval int `json:"interim_update_interval,omitempty"` // ^([6-9][0-9]|[1-9][0-9]{2,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9][0-9]|86400)$
|
InterimUpdateInterval int `json:"interim_update_interval,omitempty"` // ^([6-9][0-9]|[1-9][0-9]{2,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9][0-9]|86400)$
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
UseUsgAcctServer bool `json:"use_usg_acct_server"`
|
UseUsgAcctServer bool `json:"use_usg_acct_server"`
|
||||||
UseUsgAuthServer bool `json:"use_usg_auth_server"`
|
UseUsgAuthServer bool `json:"use_usg_auth_server"`
|
||||||
VLANEnabled bool `json:"vlan_enabled"`
|
VLANEnabled bool `json:"vlan_enabled"`
|
||||||
VLANWLANMode string `json:"vlan_wlan_mode,omitempty"` // disabled|optional|required
|
VLANWLANMode string `json:"vlan_wlan_mode,omitempty"` // disabled|optional|required
|
||||||
}
|
}
|
||||||
|
|
||||||
type RADIUSProfile_AcctServers struct {
|
type RADIUSProfileAcctServers struct {
|
||||||
IP string `json:"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])$
|
IP string `json:"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])$
|
||||||
Port int `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])$|^$
|
Port int `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])$|^$
|
||||||
XSecret string `json:"x_secret,omitempty"`
|
XSecret string `json:"x_secret,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RADIUSProfile_AuthServers struct {
|
type RADIUSProfileAuthServers struct {
|
||||||
IP string `json:"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])$
|
IP string `json:"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])$
|
||||||
Port int `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])$|^$
|
Port int `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])$|^$
|
||||||
XSecret string `json:"x_secret,omitempty"`
|
XSecret string `json:"x_secret,omitempty"`
|
||||||
|
|||||||
@@ -23,19 +23,19 @@ 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"` // stream|upgrade
|
||||||
AdditionalSoundsEnabled bool `json:"additional_sounds_enabled"`
|
AdditionalSoundsEnabled bool `json:"additional_sounds_enabled"`
|
||||||
BroadcastgroupID string `json:"broadcastgroup_id"`
|
BroadcastgroupID string `json:"broadcastgroup_id"`
|
||||||
CronExpr string `json:"cron_expr,omitempty"`
|
CronExpr string `json:"cron_expr,omitempty"`
|
||||||
ExecuteOnlyOnce bool `json:"execute_only_once"`
|
ExecuteOnlyOnce bool `json:"execute_only_once"`
|
||||||
MediafileID string `json:"mediafile_id"`
|
MediafileID string `json:"mediafile_id"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
SampleFilename string `json:"sample_filename,omitempty"`
|
SampleFilename string `json:"sample_filename,omitempty"`
|
||||||
StreamType string `json:"stream_type,omitempty"` // media|sample
|
StreamType string `json:"stream_type,omitempty"` // media|sample
|
||||||
UpgradeTargets []ScheduleTask_UpgradeTargets `json:"upgrade_targets,omitempty"`
|
UpgradeTargets []ScheduleTaskUpgradeTargets `json:"upgrade_targets,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ScheduleTask_UpgradeTargets struct {
|
type ScheduleTaskUpgradeTargets struct {
|
||||||
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})$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,29 +25,29 @@ type SettingIps struct {
|
|||||||
|
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
|
|
||||||
DNSFiltering bool `json:"dns_filtering"`
|
DNSFiltering bool `json:"dns_filtering"`
|
||||||
DNSFilters []SettingIps_DNSFilters `json:"dns_filters,omitempty"`
|
DNSFilters []SettingIpsDNSFilters `json:"dns_filters,omitempty"`
|
||||||
EnabledCategories []string `json:"enabled_categories,omitempty"` // emerging-activex|emerging-attackresponse|botcc|emerging-chat|ciarmy|compromised|emerging-dns|emerging-dos|dshield|emerging-exploit|emerging-ftp|emerging-games|emerging-icmp|emerging-icmpinfo|emerging-imap|emerging-inappropriate|emerging-info|emerging-malware|emerging-misc|emerging-mobile|emerging-netbios|emerging-p2p|emerging-policy|emerging-pop3|emerging-rpc|emerging-scada|emerging-scan|emerging-shellcode|emerging-smtp|emerging-snmp|spamhaus|emerging-sql|emerging-telnet|emerging-tftp|tor|emerging-trojan|emerging-useragent|emerging-voip|emerging-webapps|emerging-webclient|emerging-webserver|emerging-worm
|
EnabledCategories []string `json:"enabled_categories,omitempty"` // emerging-activex|emerging-attackresponse|botcc|emerging-chat|ciarmy|compromised|emerging-dns|emerging-dos|dshield|emerging-exploit|emerging-ftp|emerging-games|emerging-icmp|emerging-icmpinfo|emerging-imap|emerging-inappropriate|emerging-info|emerging-malware|emerging-misc|emerging-mobile|emerging-netbios|emerging-p2p|emerging-policy|emerging-pop3|emerging-rpc|emerging-scada|emerging-scan|emerging-shellcode|emerging-smtp|emerging-snmp|spamhaus|emerging-sql|emerging-telnet|emerging-tftp|tor|emerging-trojan|emerging-useragent|emerging-voip|emerging-webapps|emerging-webclient|emerging-webserver|emerging-worm
|
||||||
EndpointScanning bool `json:"endpoint_scanning"`
|
EndpointScanning bool `json:"endpoint_scanning"`
|
||||||
Honeypot []SettingIps_Honeypot `json:"honeypot,omitempty"`
|
Honeypot []SettingIpsHoneypot `json:"honeypot,omitempty"`
|
||||||
HoneypotEnabled bool `json:"honeypot_enabled"`
|
HoneypotEnabled bool `json:"honeypot_enabled"`
|
||||||
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
IPsMode string `json:"ips_mode,omitempty"` // ids|ips|ipsInline|disabled
|
||||||
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
RestrictIPAddresses bool `json:"restrict_ip_addresses"`
|
||||||
RestrictTor bool `json:"restrict_tor"`
|
RestrictTor bool `json:"restrict_tor"`
|
||||||
RestrictTorrents bool `json:"restrict_torrents"`
|
RestrictTorrents bool `json:"restrict_torrents"`
|
||||||
Suppression SettingIps_Suppression `json:"suppression,omitempty"`
|
Suppression SettingIpsSuppression `json:"suppression,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_Alerts struct {
|
type SettingIpsAlerts struct {
|
||||||
Category string `json:"category,omitempty"`
|
Category string `json:"category,omitempty"`
|
||||||
Gid int `json:"gid,omitempty"`
|
Gid int `json:"gid,omitempty"`
|
||||||
ID int `json:"id,omitempty"`
|
ID int `json:"id,omitempty"`
|
||||||
Signature string `json:"signature,omitempty"`
|
Signature string `json:"signature,omitempty"`
|
||||||
Tracking []SettingIps_Tracking `json:"tracking,omitempty"`
|
Tracking []SettingIpsTracking `json:"tracking,omitempty"`
|
||||||
Type string `json:"type,omitempty"` // all|track
|
Type string `json:"type,omitempty"` // all|track
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_DNSFilters struct {
|
type SettingIpsDNSFilters struct {
|
||||||
AllowedSites []string `json:"allowed_sites,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
|
AllowedSites []string `json:"allowed_sites,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
|
||||||
BlockedSites []string `json:"blocked_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.-]+$|^$
|
BlockedTld []string `json:"blocked_tld,omitempty"` // ^[a-zA-Z0-9.-]+$|^$
|
||||||
@@ -58,24 +58,24 @@ type SettingIps_DNSFilters struct {
|
|||||||
Version string `json:"version,omitempty"` // v4|v6
|
Version string `json:"version,omitempty"` // v4|v6
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_Honeypot struct {
|
type SettingIpsHoneypot struct {
|
||||||
IPAddress string `json:"ip_address,omitempty"`
|
IPAddress string `json:"ip_address,omitempty"`
|
||||||
NetworkID string `json:"network_id"`
|
NetworkID string `json:"network_id"`
|
||||||
Version string `json:"version,omitempty"` // v4|v6
|
Version string `json:"version,omitempty"` // v4|v6
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_Suppression struct {
|
type SettingIpsSuppression struct {
|
||||||
Alerts []SettingIps_Alerts `json:"alerts,omitempty"`
|
Alerts []SettingIpsAlerts `json:"alerts,omitempty"`
|
||||||
Whitelist []SettingIps_Whitelist `json:"whitelist,omitempty"`
|
Whitelist []SettingIpsWhitelist `json:"whitelist,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_Tracking struct {
|
type SettingIpsTracking struct {
|
||||||
Direction string `json:"direction,omitempty"` // both|src|dest
|
Direction string `json:"direction,omitempty"` // both|src|dest
|
||||||
Mode string `json:"mode,omitempty"` // ip|subnet|network
|
Mode string `json:"mode,omitempty"` // ip|subnet|network
|
||||||
Value string `json:"value,omitempty"`
|
Value string `json:"value,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SettingIps_Whitelist struct {
|
type SettingIpsWhitelist struct {
|
||||||
Direction string `json:"direction,omitempty"` // both|src|dest
|
Direction string `json:"direction,omitempty"` // both|src|dest
|
||||||
Mode string `json:"mode,omitempty"` // ip|subnet|network
|
Mode string `json:"mode,omitempty"` // ip|subnet|network
|
||||||
Value string `json:"value,omitempty"`
|
Value string `json:"value,omitempty"`
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ type SpatialRecord 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"`
|
||||||
|
|
||||||
Devices []SpatialRecord_Devices `json:"devices,omitempty"`
|
Devices []SpatialRecordDevices `json:"devices,omitempty"`
|
||||||
Name string `json:"name,omitempty"` // .{1,128}
|
Name string `json:"name,omitempty"` // .{1,128}
|
||||||
}
|
}
|
||||||
|
|
||||||
type SpatialRecord_Devices struct {
|
type SpatialRecordDevices struct {
|
||||||
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})$
|
||||||
Position SpatialRecord_Position `json:"position,omitempty"`
|
Position SpatialRecordPosition `json:"position,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SpatialRecord_Position struct {
|
type SpatialRecordPosition struct {
|
||||||
X float64 `json:"x,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
X float64 `json:"x,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
||||||
Y float64 `json:"y,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
Y float64 `json:"y,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
||||||
Z float64 `json:"z,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
Z float64 `json:"z,omitempty"` // (^([-]?[\d]+)$)|(^([-]?[\d]+[.]?[\d]+)$)
|
||||||
|
|||||||
Reference in New Issue
Block a user