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

// GetUniverseMoonsMoonIDOKBodyPosition get_universe_moons_moon_id_position
//
// position object
// swagger:model getUniverseMoonsMoonIdOKBodyPosition

type GetUniverseMoonsMoonIDOKBodyPosition struct {

	// get_universe_moons_moon_id_x
	//
	// x number
	// Required: true
	X *float32 `json:"x"`

	// get_universe_moons_moon_id_y
	//
	// y number
	// Required: true
	Y *float32 `json:"y"`

	// get_universe_moons_moon_id_z
	//
	// z number
	// Required: true
	Z *float32 `json:"z"`
}

/* polymorph getUniverseMoonsMoonIdOKBodyPosition x false */

/* polymorph getUniverseMoonsMoonIdOKBodyPosition y false */

/* polymorph getUniverseMoonsMoonIdOKBodyPosition z false */

// Validate validates this get universe moons moon Id o k body position
func (m *GetUniverseMoonsMoonIDOKBodyPosition) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

func (m *GetUniverseMoonsMoonIDOKBodyPosition) validateX(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetUniverseMoonsMoonIDOKBodyPosition) validateY(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetUniverseMoonsMoonIDOKBodyPosition) validateZ(formats strfmt.Registry) error {

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

	return nil
}

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

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