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

// GetCharactersCharacterIDPlanetsPlanetIDOKBody get_characters_character_id_planets_planet_id_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdPlanetsPlanetIdOKBody

type GetCharactersCharacterIDPlanetsPlanetIDOKBody struct {

	// links
	// Required: true
	Links GetCharactersCharacterIDPlanetsPlanetIDOKBodyLinks `json:"links"`

	// pins
	// Required: true
	Pins GetCharactersCharacterIDPlanetsPlanetIDOKBodyPins `json:"pins"`

	// routes
	// Required: true
	Routes GetCharactersCharacterIDPlanetsPlanetIDOKBodyRoutes `json:"routes"`
}

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBody links false */

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBody pins false */

/* polymorph getCharactersCharacterIdPlanetsPlanetIdOKBody routes false */

// Validate validates this get characters character Id planets planet Id o k body
func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBody) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBody) validateLinks(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBody) validatePins(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDPlanetsPlanetIDOKBody) validateRoutes(formats strfmt.Registry) error {

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

	return nil
}

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

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