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

// GetFwStatsOKBodyItemsVictoryPoints get_fw_stats_victory_points
//
// Summary of victory points gained for the given faction
// swagger:model getFwStatsOKBodyItemsVictoryPoints

type GetFwStatsOKBodyItemsVictoryPoints struct {

	// get_fw_stats_last_week
	//
	// Last week's victory points gained
	// Required: true
	LastWeek *int32 `json:"last_week"`

	// get_fw_stats_total
	//
	// Total victory points gained since faction warfare began
	// Required: true
	Total *int32 `json:"total"`

	// get_fw_stats_yesterday
	//
	// Yesterday's victory points gained
	// Required: true
	Yesterday *int32 `json:"yesterday"`
}

/* polymorph getFwStatsOKBodyItemsVictoryPoints last_week false */

/* polymorph getFwStatsOKBodyItemsVictoryPoints total false */

/* polymorph getFwStatsOKBodyItemsVictoryPoints yesterday false */

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

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

	if err := m.validateTotal(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 *GetFwStatsOKBodyItemsVictoryPoints) validateLastWeek(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetFwStatsOKBodyItemsVictoryPoints) validateTotal(formats strfmt.Registry) error {

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

	return nil
}

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

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

	return nil
}

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

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