// 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 (
	"encoding/json"

	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// GetCharactersCharacterIDWalletJournalOKBodyItems get_characters_character_id_wallet_journal_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdWalletJournalOKBodyItems

type GetCharactersCharacterIDWalletJournalOKBodyItems struct {

	// get_characters_character_id_wallet_journal_amount
	//
	// Transaction amount. Positive when value transferred to the first party. Negative otherwise
	Amount float32 `json:"amount,omitempty"`

	// get_characters_character_id_wallet_journal_balance
	//
	// Wallet balance after transaction occurred
	Balance float32 `json:"balance,omitempty"`

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

	// extra info
	ExtraInfo *GetCharactersCharacterIDWalletJournalOKBodyItemsExtraInfo `json:"extra_info,omitempty"`

	// get_characters_character_id_wallet_journal_first_party_id
	//
	// first_party_id integer
	FirstPartyID int32 `json:"first_party_id,omitempty"`

	// get_characters_character_id_wallet_journal_first_party_type
	//
	// first_party_type string
	FirstPartyType string `json:"first_party_type,omitempty"`

	// get_characters_character_id_wallet_journal_reason
	//
	// reason string
	Reason string `json:"reason,omitempty"`

	// get_characters_character_id_wallet_journal_ref_id
	//
	// Unique journal reference ID
	// Required: true
	RefID *int64 `json:"ref_id"`

	// get_characters_character_id_wallet_journal_ref_type
	//
	// Transaction type, different type of transaction will populate different fields in `extra_info`
	// Required: true
	RefType *string `json:"ref_type"`

	// get_characters_character_id_wallet_journal_second_party_id
	//
	// second_party_id integer
	SecondPartyID int32 `json:"second_party_id,omitempty"`

	// get_characters_character_id_wallet_journal_second_party_type
	//
	// second_party_type string
	SecondPartyType string `json:"second_party_type,omitempty"`

	// get_characters_character_id_wallet_journal_tax
	//
	// Tax amount received for tax related transactions
	Tax float32 `json:"tax,omitempty"`

	// get_characters_character_id_wallet_journal_tax_reciever_id
	//
	// the corporation ID receiving any tax paid
	TaxRecieverID int32 `json:"tax_reciever_id,omitempty"`
}

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems amount false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems balance false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems date false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems extra_info false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems first_party_id false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems first_party_type false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems reason false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems ref_id false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems ref_type false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems second_party_id false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems second_party_type false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems tax false */

/* polymorph getCharactersCharacterIdWalletJournalOKBodyItems tax_reciever_id false */

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

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

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

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

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

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

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

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

func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) 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 *GetCharactersCharacterIDWalletJournalOKBodyItems) validateExtraInfo(formats strfmt.Registry) error {

	if swag.IsZero(m.ExtraInfo) { // not required
		return nil
	}

	if m.ExtraInfo != nil {

		if err := m.ExtraInfo.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("extra_info")
			}
			return err
		}
	}

	return nil
}

var getCharactersCharacterIdWalletJournalOKBodyItemsTypeFirstPartyTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["character","corporation","alliance","faction"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCharactersCharacterIdWalletJournalOKBodyItemsTypeFirstPartyTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItemsTypeFirstPartyTypePropEnum, v)
	}
}

const (
	// GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeCharacter captures enum value "character"
	GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeCharacter string = "character"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeCorporation captures enum value "corporation"
	GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeCorporation string = "corporation"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeAlliance captures enum value "alliance"
	GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeAlliance string = "alliance"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeFaction captures enum value "faction"
	GetCharactersCharacterIDWalletJournalOKBodyItemsFirstPartyTypeFaction string = "faction"
)

// prop value enum
func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateFirstPartyTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItemsTypeFirstPartyTypePropEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateFirstPartyType(formats strfmt.Registry) error {

	if swag.IsZero(m.FirstPartyType) { // not required
		return nil
	}

	// value enum
	if err := m.validateFirstPartyTypeEnum("first_party_type", "body", m.FirstPartyType); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateRefID(formats strfmt.Registry) error {

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

	return nil
}

var getCharactersCharacterIdWalletJournalOKBodyItemsTypeRefTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["player_trading","market_transaction","player_donation","office_rental_fee","bounty_prize_historical","insurance","mission_reward","mission_reward_bonus","cspa","corp_account_withdrawal","logo_change_fee","market_escrow","broker_fee","alliance_maintenance_fee","sales_tax","jump_clone_installation_fee","manufacturing","contract","bounty_prizes","medal_creation_fee","medal_issuing_fee","customs_office_import_duty","customs_office_export_duty","corporate_reward_payout","industry_facility_tax","project_discovery_reward","reprocessing_fee","jump_clone_activation_fee","unknown"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCharactersCharacterIdWalletJournalOKBodyItemsTypeRefTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItemsTypeRefTypePropEnum, v)
	}
}

const (
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypePlayerTrading captures enum value "player_trading"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypePlayerTrading string = "player_trading"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMarketTransaction captures enum value "market_transaction"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMarketTransaction string = "market_transaction"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypePlayerDonation captures enum value "player_donation"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypePlayerDonation string = "player_donation"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeOfficeRentalFee captures enum value "office_rental_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeOfficeRentalFee string = "office_rental_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBountyPrizeHistorical captures enum value "bounty_prize_historical"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBountyPrizeHistorical string = "bounty_prize_historical"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeInsurance captures enum value "insurance"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeInsurance string = "insurance"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMissionReward captures enum value "mission_reward"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMissionReward string = "mission_reward"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMissionRewardBonus captures enum value "mission_reward_bonus"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMissionRewardBonus string = "mission_reward_bonus"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCspa captures enum value "cspa"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCspa string = "cspa"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCorpAccountWithdrawal captures enum value "corp_account_withdrawal"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCorpAccountWithdrawal string = "corp_account_withdrawal"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeLogoChangeFee captures enum value "logo_change_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeLogoChangeFee string = "logo_change_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMarketEscrow captures enum value "market_escrow"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMarketEscrow string = "market_escrow"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBrokerFee captures enum value "broker_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBrokerFee string = "broker_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeAllianceMaintenanceFee captures enum value "alliance_maintenance_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeAllianceMaintenanceFee string = "alliance_maintenance_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeSalesTax captures enum value "sales_tax"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeSalesTax string = "sales_tax"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeJumpCloneInstallationFee captures enum value "jump_clone_installation_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeJumpCloneInstallationFee string = "jump_clone_installation_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeManufacturing captures enum value "manufacturing"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeManufacturing string = "manufacturing"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeContract captures enum value "contract"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeContract string = "contract"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBountyPrizes captures enum value "bounty_prizes"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeBountyPrizes string = "bounty_prizes"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMedalCreationFee captures enum value "medal_creation_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMedalCreationFee string = "medal_creation_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMedalIssuingFee captures enum value "medal_issuing_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeMedalIssuingFee string = "medal_issuing_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCustomsOfficeImportDuty captures enum value "customs_office_import_duty"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCustomsOfficeImportDuty string = "customs_office_import_duty"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCustomsOfficeExportDuty captures enum value "customs_office_export_duty"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCustomsOfficeExportDuty string = "customs_office_export_duty"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCorporateRewardPayout captures enum value "corporate_reward_payout"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeCorporateRewardPayout string = "corporate_reward_payout"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeIndustryFacilityTax captures enum value "industry_facility_tax"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeIndustryFacilityTax string = "industry_facility_tax"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeProjectDiscoveryReward captures enum value "project_discovery_reward"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeProjectDiscoveryReward string = "project_discovery_reward"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeReprocessingFee captures enum value "reprocessing_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeReprocessingFee string = "reprocessing_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeJumpCloneActivationFee captures enum value "jump_clone_activation_fee"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeJumpCloneActivationFee string = "jump_clone_activation_fee"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeUnknown captures enum value "unknown"
	GetCharactersCharacterIDWalletJournalOKBodyItemsRefTypeUnknown string = "unknown"
)

// prop value enum
func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateRefTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItemsTypeRefTypePropEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateRefType(formats strfmt.Registry) error {

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

	// value enum
	if err := m.validateRefTypeEnum("ref_type", "body", *m.RefType); err != nil {
		return err
	}

	return nil
}

var getCharactersCharacterIdWalletJournalOKBodyItemsTypeSecondPartyTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["character","corporation","alliance","faction"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCharactersCharacterIdWalletJournalOKBodyItemsTypeSecondPartyTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItemsTypeSecondPartyTypePropEnum, v)
	}
}

const (
	// GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeCharacter captures enum value "character"
	GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeCharacter string = "character"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeCorporation captures enum value "corporation"
	GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeCorporation string = "corporation"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeAlliance captures enum value "alliance"
	GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeAlliance string = "alliance"
	// GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeFaction captures enum value "faction"
	GetCharactersCharacterIDWalletJournalOKBodyItemsSecondPartyTypeFaction string = "faction"
)

// prop value enum
func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateSecondPartyTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItemsTypeSecondPartyTypePropEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCharactersCharacterIDWalletJournalOKBodyItems) validateSecondPartyType(formats strfmt.Registry) error {

	if swag.IsZero(m.SecondPartyType) { // not required
		return nil
	}

	// value enum
	if err := m.validateSecondPartyTypeEnum("second_party_type", "body", m.SecondPartyType); err != nil {
		return err
	}

	return nil
}

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

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