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

// GetUniverseStargatesStargateIDOKBodyPosition get_universe_stargates_stargate_id_position
//
// position object
// swagger:model getUniverseStargatesStargateIdOKBodyPosition

type GetUniverseStargatesStargateIDOKBodyPosition struct {

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

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

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

/* polymorph getUniverseStargatesStargateIdOKBodyPosition x false */

/* polymorph getUniverseStargatesStargateIdOKBodyPosition y false */

/* polymorph getUniverseStargatesStargateIdOKBodyPosition z false */

// Validate validates this get universe stargates stargate Id o k body position
func (m *GetUniverseStargatesStargateIDOKBodyPosition) 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 *GetUniverseStargatesStargateIDOKBodyPosition) validateX(formats strfmt.Registry) error {

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

	return nil
}

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

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

	return nil
}

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

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

	return nil
}

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

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