Regenerated types so that sub-types are not embedded.

This allows callers to create complex payloads; for example, to create a
Device type for a Unifi Switch with PortOverrides, the caller needs to
create these sub-types, which is not possible when it's purely embedded.
This commit is contained in:
James Stephenson
2020-09-02 17:35:14 -04:00
committed by Paul Tyng
parent 35eda4f67b
commit bee58f48d4
8 changed files with 420 additions and 349 deletions

View File

@@ -23,16 +23,18 @@ type Dashboard struct {
NoDelete bool `json:"attr_no_delete,omitempty"`
NoEdit bool `json:"attr_no_edit,omitempty"`
ControllerVersion string `json:"controller_version,omitempty"`
Desc string `json:"desc,omitempty"`
IsPublic bool `json:"is_public"`
Modules []struct {
Config string `json:"config,omitempty"`
ID string `json:"id"`
ModuleID string `json:"module_id"`
Restrictions string `json:"restrictions,omitempty"`
} `json:"modules,omitempty"`
Name string `json:"name,omitempty"`
ControllerVersion string `json:"controller_version,omitempty"`
Desc string `json:"desc,omitempty"`
IsPublic bool `json:"is_public"`
Modules []Dashboard_Modules `json:"modules,omitempty"`
Name string `json:"name,omitempty"`
}
type Dashboard_Modules struct {
Config string `json:"config,omitempty"`
ID string `json:"id"`
ModuleID string `json:"module_id"`
Restrictions string `json:"restrictions,omitempty"`
}
func (c *Client) listDashboard(ctx context.Context, site string) ([]Dashboard, error) {