This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
eve-goclient/models/get_fw_stats_o_k_body_items.go

176 lines
3.8 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"
)
// GetFwStatsOKBodyItems get_fw_stats_200_ok
//
// 200 ok object
// swagger:model getFwStatsOKBodyItems
type GetFwStatsOKBodyItems struct {
// get_fw_stats_faction_id
//
// faction_id integer
// Required: true
FactionID *int32 `json:"faction_id"`
// kills
// Required: true
Kills *GetFwStatsOKBodyItemsKills `json:"kills"`
// get_fw_stats_pilots
//
// How many pilots fight for the given faction
// Required: true
Pilots *int32 `json:"pilots"`
// get_fw_stats_systems_controlled
//
// The number of solar systems controlled by the given faction
// Required: true
SystemsControlled *int32 `json:"systems_controlled"`
// victory points
// Required: true
VictoryPoints *GetFwStatsOKBodyItemsVictoryPoints `json:"victory_points"`
}
/* polymorph getFwStatsOKBodyItems faction_id false */
/* polymorph getFwStatsOKBodyItems kills false */
/* polymorph getFwStatsOKBodyItems pilots false */
/* polymorph getFwStatsOKBodyItems systems_controlled false */
/* polymorph getFwStatsOKBodyItems victory_points false */
// Validate validates this get fw stats o k body items
func (m *GetFwStatsOKBodyItems) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFactionID(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateKills(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validatePilots(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateSystemsControlled(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateVictoryPoints(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GetFwStatsOKBodyItems) validateFactionID(formats strfmt.Registry) error {
if err := validate.Required("faction_id", "body", m.FactionID); err != nil {
return err
}
return nil
}
func (m *GetFwStatsOKBodyItems) validateKills(formats strfmt.Registry) error {
if err := validate.Required("kills", "body", m.Kills); err != nil {
return err
}
if m.Kills != nil {
if err := m.Kills.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kills")
}
return err
}
}
return nil
}
func (m *GetFwStatsOKBodyItems) validatePilots(formats strfmt.Registry) error {
if err := validate.Required("pilots", "body", m.Pilots); err != nil {
return err
}
return nil
}
func (m *GetFwStatsOKBodyItems) validateSystemsControlled(formats strfmt.Registry) error {
if err := validate.Required("systems_controlled", "body", m.SystemsControlled); err != nil {
return err
}
return nil
}
func (m *GetFwStatsOKBodyItems) validateVictoryPoints(formats strfmt.Registry) error {
if err := validate.Required("victory_points", "body", m.VictoryPoints); err != nil {
return err
}
if m.VictoryPoints != nil {
if err := m.VictoryPoints.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("victory_points")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GetFwStatsOKBodyItems) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GetFwStatsOKBodyItems) UnmarshalBinary(b []byte) error {
var res GetFwStatsOKBodyItems
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}