167 lines
3.6 KiB
Go
167 lines
3.6 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
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/errors"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
)
|
|
|
|
// GetUniverseGroupsGroupIDOKBody get_universe_groups_group_id_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getUniverseGroupsGroupIdOKBody
|
|
|
|
type GetUniverseGroupsGroupIDOKBody struct {
|
|
|
|
// get_universe_groups_group_id_category_id
|
|
//
|
|
// category_id integer
|
|
// Required: true
|
|
CategoryID *int32 `json:"category_id"`
|
|
|
|
// get_universe_groups_group_id_group_id
|
|
//
|
|
// group_id integer
|
|
// Required: true
|
|
GroupID *int32 `json:"group_id"`
|
|
|
|
// get_universe_groups_group_id_name
|
|
//
|
|
// name string
|
|
// Required: true
|
|
Name *string `json:"name"`
|
|
|
|
// get_universe_groups_group_id_published
|
|
//
|
|
// published boolean
|
|
// Required: true
|
|
Published *bool `json:"published"`
|
|
|
|
// get_universe_groups_group_id_types
|
|
//
|
|
// types array
|
|
// Required: true
|
|
// Max Items: 10000
|
|
Types []int32 `json:"types"`
|
|
}
|
|
|
|
/* polymorph getUniverseGroupsGroupIdOKBody category_id false */
|
|
|
|
/* polymorph getUniverseGroupsGroupIdOKBody group_id false */
|
|
|
|
/* polymorph getUniverseGroupsGroupIdOKBody name false */
|
|
|
|
/* polymorph getUniverseGroupsGroupIdOKBody published false */
|
|
|
|
/* polymorph getUniverseGroupsGroupIdOKBody types false */
|
|
|
|
// Validate validates this get universe groups group Id o k body
|
|
func (m *GetUniverseGroupsGroupIDOKBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateCategoryID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateGroupID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateName(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validatePublished(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateTypes(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetUniverseGroupsGroupIDOKBody) validateCategoryID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("category_id", "body", m.CategoryID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetUniverseGroupsGroupIDOKBody) validateGroupID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("group_id", "body", m.GroupID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetUniverseGroupsGroupIDOKBody) validateName(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("name", "body", m.Name); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetUniverseGroupsGroupIDOKBody) validatePublished(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("published", "body", m.Published); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetUniverseGroupsGroupIDOKBody) validateTypes(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("types", "body", m.Types); err != nil {
|
|
return err
|
|
}
|
|
|
|
iTypesSize := int64(len(m.Types))
|
|
|
|
if err := validate.MaxItems("types", "body", iTypesSize, 10000); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetUniverseGroupsGroupIDOKBody) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetUniverseGroupsGroupIDOKBody) UnmarshalBinary(b []byte) error {
|
|
var res GetUniverseGroupsGroupIDOKBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|