127 lines
3 KiB
Go
127 lines
3 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"
|
|
)
|
|
|
|
// GetAlliancesAllianceIDOKBody get_alliances_alliance_id_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getAlliancesAllianceIdOKBody
|
|
|
|
type GetAlliancesAllianceIDOKBody struct {
|
|
|
|
// get_alliances_alliance_id_alliance_name
|
|
//
|
|
// the full name of the alliance
|
|
// Required: true
|
|
AllianceName *string `json:"alliance_name"`
|
|
|
|
// get_alliances_alliance_id_date_founded
|
|
//
|
|
// date_founded string
|
|
// Required: true
|
|
DateFounded *strfmt.DateTime `json:"date_founded"`
|
|
|
|
// get_alliances_alliance_id_executor_corp
|
|
//
|
|
// the executor corporation ID, if this alliance is not closed
|
|
ExecutorCorp int32 `json:"executor_corp,omitempty"`
|
|
|
|
// get_alliances_alliance_id_ticker
|
|
//
|
|
// the short name of the alliance
|
|
// Required: true
|
|
Ticker *string `json:"ticker"`
|
|
}
|
|
|
|
/* polymorph getAlliancesAllianceIdOKBody alliance_name false */
|
|
|
|
/* polymorph getAlliancesAllianceIdOKBody date_founded false */
|
|
|
|
/* polymorph getAlliancesAllianceIdOKBody executor_corp false */
|
|
|
|
/* polymorph getAlliancesAllianceIdOKBody ticker false */
|
|
|
|
// Validate validates this get alliances alliance Id o k body
|
|
func (m *GetAlliancesAllianceIDOKBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateAllianceName(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateDateFounded(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateTicker(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetAlliancesAllianceIDOKBody) validateAllianceName(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("alliance_name", "body", m.AllianceName); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetAlliancesAllianceIDOKBody) validateDateFounded(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("date_founded", "body", m.DateFounded); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err := validate.FormatOf("date_founded", "body", "date-time", m.DateFounded.String(), formats); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetAlliancesAllianceIDOKBody) validateTicker(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("ticker", "body", m.Ticker); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetAlliancesAllianceIDOKBody) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetAlliancesAllianceIDOKBody) UnmarshalBinary(b []byte) error {
|
|
var res GetAlliancesAllianceIDOKBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|