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

// GetWarsWarIDKillmailsOKBodyItems get_wars_war_id_killmails_200_ok
//
// 200 ok object
// swagger:model getWarsWarIdKillmailsOKBodyItems

type GetWarsWarIDKillmailsOKBodyItems struct {

	// get_wars_war_id_killmails_killmail_hash
	//
	// A hash of this killmail
	// Required: true
	KillmailHash *string `json:"killmail_hash"`

	// get_wars_war_id_killmails_killmail_id
	//
	// ID of this killmail
	// Required: true
	KillmailID *int32 `json:"killmail_id"`
}

/* polymorph getWarsWarIdKillmailsOKBodyItems killmail_hash false */

/* polymorph getWarsWarIdKillmailsOKBodyItems killmail_id false */

// Validate validates this get wars war Id killmails o k body items
func (m *GetWarsWarIDKillmailsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *GetWarsWarIDKillmailsOKBodyItems) validateKillmailHash(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetWarsWarIDKillmailsOKBodyItems) validateKillmailID(formats strfmt.Registry) error {

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

	return nil
}

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

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