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

// GetMarketsPricesOKBodyItems get_markets_prices_200_ok
//
// 200 ok object
// swagger:model getMarketsPricesOKBodyItems

type GetMarketsPricesOKBodyItems struct {

	// get_markets_prices_adjusted_price
	//
	// adjusted_price number
	AdjustedPrice float32 `json:"adjusted_price,omitempty"`

	// get_markets_prices_average_price
	//
	// average_price number
	AveragePrice float32 `json:"average_price,omitempty"`

	// get_markets_prices_type_id
	//
	// type_id integer
	// Required: true
	TypeID *int32 `json:"type_id"`
}

/* polymorph getMarketsPricesOKBodyItems adjusted_price false */

/* polymorph getMarketsPricesOKBodyItems average_price false */

/* polymorph getMarketsPricesOKBodyItems type_id false */

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

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

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

func (m *GetMarketsPricesOKBodyItems) validateTypeID(formats strfmt.Registry) error {

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

	return nil
}

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

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