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

// GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems get_killmails_killmail_id_killmail_hash_attacker
//
// attacker object
// swagger:model getKillmailsKillmailIdKillmailHashOKBodyAttackersItems

type GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems struct {

	// get_killmails_killmail_id_killmail_hash_alliance_id
	//
	// alliance_id integer
	AllianceID int32 `json:"alliance_id,omitempty"`

	// get_killmails_killmail_id_killmail_hash_character_id
	//
	// character_id integer
	CharacterID int32 `json:"character_id,omitempty"`

	// get_killmails_killmail_id_killmail_hash_corporation_id
	//
	// corporation_id integer
	CorporationID int32 `json:"corporation_id,omitempty"`

	// get_killmails_killmail_id_killmail_hash_damage_done
	//
	// damage_done integer
	// Required: true
	DamageDone *int32 `json:"damage_done"`

	// get_killmails_killmail_id_killmail_hash_faction_id
	//
	// faction_id integer
	FactionID int32 `json:"faction_id,omitempty"`

	// get_killmails_killmail_id_killmail_hash_final_blow
	//
	// Was the attacker the one to achieve the final blow
	//
	// Required: true
	FinalBlow *bool `json:"final_blow"`

	// get_killmails_killmail_id_killmail_hash_security_status
	//
	// Security status for the attacker
	//
	// Required: true
	SecurityStatus *float32 `json:"security_status"`

	// get_killmails_killmail_id_killmail_hash_ship_type_id
	//
	// What ship was the attacker flying
	//
	ShipTypeID int32 `json:"ship_type_id,omitempty"`

	// get_killmails_killmail_id_killmail_hash_weapon_type_id
	//
	// What weapon was used by the attacker for the kill
	//
	WeaponTypeID int32 `json:"weapon_type_id,omitempty"`
}

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems alliance_id false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems character_id false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems corporation_id false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems damage_done false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems faction_id false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems final_blow false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems security_status false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems ship_type_id false */

/* polymorph getKillmailsKillmailIdKillmailHashOKBodyAttackersItems weapon_type_id false */

// Validate validates this get killmails killmail Id killmail hash o k body attackers items
func (m *GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

func (m *GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems) validateDamageDone(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems) validateFinalBlow(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetKillmailsKillmailIDKillmailHashOKBodyAttackersItems) validateSecurityStatus(formats strfmt.Registry) error {

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

	return nil
}

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

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