94 lines
2 KiB
Go
94 lines
2 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"
|
|
)
|
|
|
|
// GetFwWarsOKBodyItems get_fw_wars_200_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getFwWarsOKBodyItems
|
|
|
|
type GetFwWarsOKBodyItems struct {
|
|
|
|
// get_fw_wars_against_id
|
|
//
|
|
// The faction ID of the enemy faction.
|
|
// Required: true
|
|
AgainstID *int32 `json:"against_id"`
|
|
|
|
// get_fw_wars_faction_id
|
|
//
|
|
// faction_id integer
|
|
// Required: true
|
|
FactionID *int32 `json:"faction_id"`
|
|
}
|
|
|
|
/* polymorph getFwWarsOKBodyItems against_id false */
|
|
|
|
/* polymorph getFwWarsOKBodyItems faction_id false */
|
|
|
|
// Validate validates this get fw wars o k body items
|
|
func (m *GetFwWarsOKBodyItems) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateAgainstID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateFactionID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwWarsOKBodyItems) validateAgainstID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("against_id", "body", m.AgainstID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetFwWarsOKBodyItems) validateFactionID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("faction_id", "body", m.FactionID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetFwWarsOKBodyItems) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetFwWarsOKBodyItems) UnmarshalBinary(b []byte) error {
|
|
var res GetFwWarsOKBodyItems
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|