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

// GetCharactersNamesOKBodyItems get_characters_names_200_ok
//
// 200 ok object
// swagger:model getCharactersNamesOKBodyItems

type GetCharactersNamesOKBodyItems struct {

	// get_characters_names_character_id
	//
	// character_id integer
	// Required: true
	CharacterID *int64 `json:"character_id"`

	// get_characters_names_character_name
	//
	// character_name string
	// Required: true
	CharacterName *string `json:"character_name"`
}

/* polymorph getCharactersNamesOKBodyItems character_id false */

/* polymorph getCharactersNamesOKBodyItems character_name false */

// Validate validates this get characters names o k body items
func (m *GetCharactersNamesOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *GetCharactersNamesOKBodyItems) validateCharacterID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersNamesOKBodyItems) validateCharacterName(formats strfmt.Registry) error {

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

	return nil
}

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

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