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

// GetFwLeaderboardsOKBodyVictoryPoints get_fw_leaderboards_victory_points
//
// Top 4 rankings of factions by victory points from yesterday, last week and in total
// swagger:model getFwLeaderboardsOKBodyVictoryPoints

type GetFwLeaderboardsOKBodyVictoryPoints struct {

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

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

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

/* polymorph getFwLeaderboardsOKBodyVictoryPoints active_total false */

/* polymorph getFwLeaderboardsOKBodyVictoryPoints last_week false */

/* polymorph getFwLeaderboardsOKBodyVictoryPoints yesterday false */

// Validate validates this get fw leaderboards o k body victory points
func (m *GetFwLeaderboardsOKBodyVictoryPoints) 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 *GetFwLeaderboardsOKBodyVictoryPoints) validateActiveTotal(formats strfmt.Registry) error {

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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