182 lines
4.1 KiB
Go
182 lines
4.1 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"
|
|
)
|
|
|
|
// GetFwSystemsOKBodyItems get_fw_systems_200_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getFwSystemsOKBodyItems
|
|
|
|
type GetFwSystemsOKBodyItems struct {
|
|
|
|
// get_fw_systems_contested
|
|
//
|
|
// contested boolean
|
|
// Required: true
|
|
Contested *bool `json:"contested"`
|
|
|
|
// get_fw_systems_occupier_faction_id
|
|
//
|
|
// occupier_faction_id integer
|
|
// Required: true
|
|
OccupierFactionID *int32 `json:"occupier_faction_id"`
|
|
|
|
// get_fw_systems_owner_faction_id
|
|
//
|
|
// owner_faction_id integer
|
|
// Required: true
|
|
OwnerFactionID *int32 `json:"owner_faction_id"`
|
|
|
|
// get_fw_systems_solar_system_id
|
|
//
|
|
// solar_system_id integer
|
|
// Required: true
|
|
SolarSystemID *int32 `json:"solar_system_id"`
|
|
|
|
// get_fw_systems_victory_points
|
|
//
|
|
// victory_points integer
|
|
// Required: true
|
|
VictoryPoints *int32 `json:"victory_points"`
|
|
|
|
// get_fw_systems_victory_points_threshold
|
|
//
|
|
// victory_points_threshold integer
|
|
// Required: true
|
|
VictoryPointsThreshold *int32 `json:"victory_points_threshold"`
|
|
}
|
|
|
|
/* polymorph getFwSystemsOKBodyItems contested false */
|
|
|
|
/* polymorph getFwSystemsOKBodyItems occupier_faction_id false */
|
|
|
|
/* polymorph getFwSystemsOKBodyItems owner_faction_id false */
|
|
|
|
/* polymorph getFwSystemsOKBodyItems solar_system_id false */
|
|
|
|
/* polymorph getFwSystemsOKBodyItems victory_points false */
|
|
|
|
/* polymorph getFwSystemsOKBodyItems victory_points_threshold false */
|
|
|
|
// Validate validates this get fw systems o k body items
|
|
func (m *GetFwSystemsOKBodyItems) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateContested(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateOccupierFactionID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateOwnerFactionID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateSolarSystemID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateVictoryPoints(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateVictoryPointsThreshold(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateContested(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("contested", "body", m.Contested); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateOccupierFactionID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("occupier_faction_id", "body", m.OccupierFactionID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateOwnerFactionID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("owner_faction_id", "body", m.OwnerFactionID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateSolarSystemID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("solar_system_id", "body", m.SolarSystemID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateVictoryPoints(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("victory_points", "body", m.VictoryPoints); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwSystemsOKBodyItems) validateVictoryPointsThreshold(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("victory_points_threshold", "body", m.VictoryPointsThreshold); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetFwSystemsOKBodyItems) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetFwSystemsOKBodyItems) UnmarshalBinary(b []byte) error {
|
|
var res GetFwSystemsOKBodyItems
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|