// 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"
)

// GetAlliancesNamesOKBodyItems get_alliances_names_200_ok
//
// 200 ok object
// swagger:model getAlliancesNamesOKBodyItems

type GetAlliancesNamesOKBodyItems struct {

	// get_alliances_names_alliance_id
	//
	// alliance_id integer
	// Required: true
	AllianceID *int32 `json:"alliance_id"`

	// get_alliances_names_alliance_name
	//
	// alliance_name string
	// Required: true
	AllianceName *string `json:"alliance_name"`
}

/* polymorph getAlliancesNamesOKBodyItems alliance_id false */

/* polymorph getAlliancesNamesOKBodyItems alliance_name false */

// Validate validates this get alliances names o k body items
func (m *GetAlliancesNamesOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateAllianceID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateAllianceName(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *GetAlliancesNamesOKBodyItems) validateAllianceID(formats strfmt.Registry) error {

	if err := validate.Required("alliance_id", "body", m.AllianceID); err != nil {
		return err
	}

	return nil
}

func (m *GetAlliancesNamesOKBodyItems) validateAllianceName(formats strfmt.Registry) error {

	if err := validate.Required("alliance_name", "body", m.AllianceName); err != nil {
		return err
	}

	return nil
}

// MarshalBinary interface implementation
func (m *GetAlliancesNamesOKBodyItems) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *GetAlliancesNamesOKBodyItems) UnmarshalBinary(b []byte) error {
	var res GetAlliancesNamesOKBodyItems
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
