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

// GetCharactersCharacterIDWalletTransactionsOKBodyItems get_characters_character_id_wallet_transactions_200_ok
//
// wallet transaction
// swagger:model getCharactersCharacterIdWalletTransactionsOKBodyItems

type GetCharactersCharacterIDWalletTransactionsOKBodyItems struct {

	// get_characters_character_id_wallet_transactions_client_id
	//
	// client_id integer
	// Required: true
	ClientID *int32 `json:"client_id"`

	// get_characters_character_id_wallet_transactions_date
	//
	// Date and time of transaction
	// Required: true
	Date *strfmt.DateTime `json:"date"`

	// get_characters_character_id_wallet_transactions_is_buy
	//
	// is_buy boolean
	// Required: true
	IsBuy *bool `json:"is_buy"`

	// get_characters_character_id_wallet_transactions_is_personal
	//
	// is_personal boolean
	// Required: true
	IsPersonal *bool `json:"is_personal"`

	// get_characters_character_id_wallet_transactions_journal_ref_id
	//
	// journal_ref_id integer
	// Required: true
	JournalRefID *int64 `json:"journal_ref_id"`

	// get_characters_character_id_wallet_transactions_location_id
	//
	// location_id integer
	// Required: true
	LocationID *int64 `json:"location_id"`

	// get_characters_character_id_wallet_transactions_quantity
	//
	// quantity integer
	// Required: true
	Quantity *int32 `json:"quantity"`

	// get_characters_character_id_wallet_transactions_transaction_id
	//
	// Unique transaction ID
	// Required: true
	TransactionID *int64 `json:"transaction_id"`

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

	// get_characters_character_id_wallet_transactions_unit_price
	//
	// Amount paid per unit
	// Required: true
	UnitPrice *float32 `json:"unit_price"`
}

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems client_id false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems date false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems is_buy false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems is_personal false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems journal_ref_id false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems location_id false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems quantity false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems transaction_id false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems type_id false */

/* polymorph getCharactersCharacterIdWalletTransactionsOKBodyItems unit_price false */

// Validate validates this get characters character Id wallet transactions o k body items
func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

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

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

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

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

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

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

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateClientID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateDate(formats strfmt.Registry) error {

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

	if err := validate.FormatOf("date", "body", "date-time", m.Date.String(), formats); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateIsBuy(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateIsPersonal(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateJournalRefID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateLocationID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateQuantity(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateTransactionID(formats strfmt.Registry) error {

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

	return nil
}

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

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

	return nil
}

func (m *GetCharactersCharacterIDWalletTransactionsOKBodyItems) validateUnitPrice(formats strfmt.Registry) error {

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

	return nil
}

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

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