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

// GetUniverseTypesTypeIDOKBodyDogmaEffectsItems get_universe_types_type_id_dogma_effect
//
// dogma_effect object
// swagger:model getUniverseTypesTypeIdOKBodyDogmaEffectsItems

type GetUniverseTypesTypeIDOKBodyDogmaEffectsItems struct {

	// get_universe_types_type_id_effect_id
	//
	// effect_id integer
	// Required: true
	EffectID *int32 `json:"effect_id"`

	// get_universe_types_type_id_is_default
	//
	// is_default boolean
	// Required: true
	IsDefault *bool `json:"is_default"`
}

/* polymorph getUniverseTypesTypeIdOKBodyDogmaEffectsItems effect_id false */

/* polymorph getUniverseTypesTypeIdOKBodyDogmaEffectsItems is_default false */

// Validate validates this get universe types type Id o k body dogma effects items
func (m *GetUniverseTypesTypeIDOKBodyDogmaEffectsItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *GetUniverseTypesTypeIDOKBodyDogmaEffectsItems) validateEffectID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetUniverseTypesTypeIDOKBodyDogmaEffectsItems) validateIsDefault(formats strfmt.Registry) error {

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

	return nil
}

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

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