63 lines
1.1 KiB
Go
63 lines
1.1 KiB
Go
package models
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
|
|
"github.com/go-openapi/errors"
|
|
)
|
|
|
|
/*Cell cell
|
|
|
|
swagger:model Cell
|
|
*/
|
|
type Cell struct {
|
|
|
|
/* Height of Cell in the Dashboard
|
|
*/
|
|
H int32 `json:"h,omitempty"`
|
|
|
|
/* Time-series data queries for Cell.
|
|
*/
|
|
Queries []string `json:"queries,omitempty"`
|
|
|
|
/* Width of Cell in the Dashboard
|
|
*/
|
|
W int32 `json:"w,omitempty"`
|
|
|
|
/* X-coordinate of Cell in the Dashboard
|
|
*/
|
|
X int32 `json:"x,omitempty"`
|
|
|
|
/* Y-coordinate of Cell in the Dashboard
|
|
*/
|
|
Y int32 `json:"y,omitempty"`
|
|
}
|
|
|
|
// Validate validates this cell
|
|
func (m *Cell) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateQueries(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Cell) validateQueries(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.Queries) { // not required
|
|
return nil
|
|
}
|
|
|
|
return nil
|
|
}
|