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

// GetFwLeaderboardsCharactersOKBodyVictoryPoints get_fw_leaderboards_characters_victory_points
//
// Top 100 rankings of pilots by victory points from yesterday, last week and in total
// swagger:model getFwLeaderboardsCharactersOKBodyVictoryPoints

type GetFwLeaderboardsCharactersOKBodyVictoryPoints struct {

	// active total
	// Required: true
	ActiveTotal GetFwLeaderboardsCharactersOKBodyVictoryPointsActiveTotal `json:"active_total"`

	// last week
	// Required: true
	LastWeek GetFwLeaderboardsCharactersOKBodyVictoryPointsLastWeek `json:"last_week"`

	// yesterday
	// Required: true
	Yesterday GetFwLeaderboardsCharactersOKBodyVictoryPointsYesterday `json:"yesterday"`
}

/* polymorph getFwLeaderboardsCharactersOKBodyVictoryPoints active_total false */

/* polymorph getFwLeaderboardsCharactersOKBodyVictoryPoints last_week false */

/* polymorph getFwLeaderboardsCharactersOKBodyVictoryPoints yesterday false */

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

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

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

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

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

func (m *GetFwLeaderboardsCharactersOKBodyVictoryPoints) validateActiveTotal(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetFwLeaderboardsCharactersOKBodyVictoryPoints) validateLastWeek(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetFwLeaderboardsCharactersOKBodyVictoryPoints) validateYesterday(formats strfmt.Registry) error {

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

	return nil
}

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

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