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

// GetFwLeaderboardsOKBody get_fw_leaderboards_ok
//
// 200 ok object
// swagger:model getFwLeaderboardsOKBody

type GetFwLeaderboardsOKBody struct {

	// kills
	// Required: true
	Kills *GetFwLeaderboardsOKBodyKills `json:"kills"`

	// victory points
	// Required: true
	VictoryPoints *GetFwLeaderboardsOKBodyVictoryPoints `json:"victory_points"`
}

/* polymorph getFwLeaderboardsOKBody kills false */

/* polymorph getFwLeaderboardsOKBody victory_points false */

// Validate validates this get fw leaderboards o k body
func (m *GetFwLeaderboardsOKBody) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateKills(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 *GetFwLeaderboardsOKBody) 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 *GetFwLeaderboardsOKBody) 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 *GetFwLeaderboardsOKBody) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

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