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

// GetCorporationsCorporationIDKillmailsRecentOKBodyItems get_corporations_corporation_id_killmails_recent_200_ok
//
// 200 ok object
// swagger:model getCorporationsCorporationIdKillmailsRecentOKBodyItems

type GetCorporationsCorporationIDKillmailsRecentOKBodyItems struct {

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

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

/* polymorph getCorporationsCorporationIdKillmailsRecentOKBodyItems killmail_hash false */

/* polymorph getCorporationsCorporationIdKillmailsRecentOKBodyItems killmail_id false */

// Validate validates this get corporations corporation Id killmails recent o k body items
func (m *GetCorporationsCorporationIDKillmailsRecentOKBodyItems) 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 *GetCorporationsCorporationIDKillmailsRecentOKBodyItems) validateKillmailHash(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCorporationsCorporationIDKillmailsRecentOKBodyItems) 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 *GetCorporationsCorporationIDKillmailsRecentOKBodyItems) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

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