// 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 (
	"encoding/json"
	"strconv"

	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// GetCorporationsCorporationIDRolesOKBodyItems get_corporations_corporation_id_roles_200_ok
//
// 200 ok object
// swagger:model getCorporationsCorporationIdRolesOKBodyItems

type GetCorporationsCorporationIDRolesOKBodyItems struct {

	// get_corporations_corporation_id_roles_character_id
	//
	// character_id integer
	// Required: true
	CharacterID *int32 `json:"character_id"`

	// get_corporations_corporation_id_roles_grantable_roles
	//
	// grantable_roles array
	// Max Items: 50
	GrantableRoles []string `json:"grantable_roles"`

	// get_corporations_corporation_id_roles_grantable_roles_at_base
	//
	// grantable_roles_at_base array
	// Max Items: 50
	GrantableRolesAtBase []string `json:"grantable_roles_at_base"`

	// get_corporations_corporation_id_roles_grantable_roles_at_hq
	//
	// grantable_roles_at_hq array
	// Max Items: 50
	GrantableRolesAtHq []string `json:"grantable_roles_at_hq"`

	// get_corporations_corporation_id_roles_grantable_roles_at_other
	//
	// grantable_roles_at_other array
	// Max Items: 50
	GrantableRolesAtOther []string `json:"grantable_roles_at_other"`

	// get_corporations_corporation_id_roles_roles
	//
	// roles array
	// Max Items: 50
	Roles []string `json:"roles"`

	// get_corporations_corporation_id_roles_roles_at_base
	//
	// roles_at_base array
	// Max Items: 50
	RolesAtBase []string `json:"roles_at_base"`

	// get_corporations_corporation_id_roles_roles_at_hq
	//
	// roles_at_hq array
	// Max Items: 50
	RolesAtHq []string `json:"roles_at_hq"`

	// get_corporations_corporation_id_roles_roles_at_other
	//
	// roles_at_other array
	// Max Items: 50
	RolesAtOther []string `json:"roles_at_other"`
}

/* polymorph getCorporationsCorporationIdRolesOKBodyItems character_id false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems grantable_roles false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems grantable_roles_at_base false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems grantable_roles_at_hq false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems grantable_roles_at_other false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems roles false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems roles_at_base false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems roles_at_hq false */

/* polymorph getCorporationsCorporationIdRolesOKBodyItems roles_at_other false */

// Validate validates this get corporations corporation Id roles o k body items
func (m *GetCorporationsCorporationIDRolesOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

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

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

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

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

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

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

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

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRoles(formats strfmt.Registry) error {

	if swag.IsZero(m.GrantableRoles) { // not required
		return nil
	}

	iGrantableRolesSize := int64(len(m.GrantableRoles))

	if err := validate.MaxItems("grantable_roles", "body", iGrantableRolesSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.GrantableRoles); i++ {

		// value enum
		if err := m.validateGrantableRolesItemsEnum("grantable_roles"+"."+strconv.Itoa(i), "body", m.GrantableRoles[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtBaseItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtBaseItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtBaseItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtBaseItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtBaseItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtBase(formats strfmt.Registry) error {

	if swag.IsZero(m.GrantableRolesAtBase) { // not required
		return nil
	}

	iGrantableRolesAtBaseSize := int64(len(m.GrantableRolesAtBase))

	if err := validate.MaxItems("grantable_roles_at_base", "body", iGrantableRolesAtBaseSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.GrantableRolesAtBase); i++ {

		// value enum
		if err := m.validateGrantableRolesAtBaseItemsEnum("grantable_roles_at_base"+"."+strconv.Itoa(i), "body", m.GrantableRolesAtBase[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtHqItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtHqItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtHqItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtHqItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtHqItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtHq(formats strfmt.Registry) error {

	if swag.IsZero(m.GrantableRolesAtHq) { // not required
		return nil
	}

	iGrantableRolesAtHqSize := int64(len(m.GrantableRolesAtHq))

	if err := validate.MaxItems("grantable_roles_at_hq", "body", iGrantableRolesAtHqSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.GrantableRolesAtHq); i++ {

		// value enum
		if err := m.validateGrantableRolesAtHqItemsEnum("grantable_roles_at_hq"+"."+strconv.Itoa(i), "body", m.GrantableRolesAtHq[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtOtherItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtOtherItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtOtherItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtOtherItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsGrantableRolesAtOtherItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateGrantableRolesAtOther(formats strfmt.Registry) error {

	if swag.IsZero(m.GrantableRolesAtOther) { // not required
		return nil
	}

	iGrantableRolesAtOtherSize := int64(len(m.GrantableRolesAtOther))

	if err := validate.MaxItems("grantable_roles_at_other", "body", iGrantableRolesAtOtherSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.GrantableRolesAtOther); i++ {

		// value enum
		if err := m.validateGrantableRolesAtOtherItemsEnum("grantable_roles_at_other"+"."+strconv.Itoa(i), "body", m.GrantableRolesAtOther[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsRolesItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsRolesItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsRolesItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsRolesItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRoles(formats strfmt.Registry) error {

	if swag.IsZero(m.Roles) { // not required
		return nil
	}

	iRolesSize := int64(len(m.Roles))

	if err := validate.MaxItems("roles", "body", iRolesSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.Roles); i++ {

		// value enum
		if err := m.validateRolesItemsEnum("roles"+"."+strconv.Itoa(i), "body", m.Roles[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsRolesAtBaseItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsRolesAtBaseItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsRolesAtBaseItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtBaseItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsRolesAtBaseItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtBase(formats strfmt.Registry) error {

	if swag.IsZero(m.RolesAtBase) { // not required
		return nil
	}

	iRolesAtBaseSize := int64(len(m.RolesAtBase))

	if err := validate.MaxItems("roles_at_base", "body", iRolesAtBaseSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.RolesAtBase); i++ {

		// value enum
		if err := m.validateRolesAtBaseItemsEnum("roles_at_base"+"."+strconv.Itoa(i), "body", m.RolesAtBase[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsRolesAtHqItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsRolesAtHqItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsRolesAtHqItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtHqItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsRolesAtHqItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtHq(formats strfmt.Registry) error {

	if swag.IsZero(m.RolesAtHq) { // not required
		return nil
	}

	iRolesAtHqSize := int64(len(m.RolesAtHq))

	if err := validate.MaxItems("roles_at_hq", "body", iRolesAtHqSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.RolesAtHq); i++ {

		// value enum
		if err := m.validateRolesAtHqItemsEnum("roles_at_hq"+"."+strconv.Itoa(i), "body", m.RolesAtHq[i]); err != nil {
			return err
		}

	}

	return nil
}

var getCorporationsCorporationIdRolesOKBodyItemsRolesAtOtherItemsEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Director","Personnel_Manager","Accountant","Security_Officer","Factory_Manager","Station_Manager","Auditor","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Diplomat","Config_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Rent_Office","Rent_Factory_Facility","Rent_Research_Facility","Junior_Accountant","Config_Starbase_Equipment","Trader","Communications_Officer","Contract_Manager","Starbase_Defense_Operator","Starbase_Fuel_Technician","Fitting_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCorporationsCorporationIdRolesOKBodyItemsRolesAtOtherItemsEnum = append(getCorporationsCorporationIdRolesOKBodyItemsRolesAtOtherItemsEnum, v)
	}
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtOtherItemsEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCorporationsCorporationIdRolesOKBodyItemsRolesAtOtherItemsEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCorporationsCorporationIDRolesOKBodyItems) validateRolesAtOther(formats strfmt.Registry) error {

	if swag.IsZero(m.RolesAtOther) { // not required
		return nil
	}

	iRolesAtOtherSize := int64(len(m.RolesAtOther))

	if err := validate.MaxItems("roles_at_other", "body", iRolesAtOtherSize, 50); err != nil {
		return err
	}

	for i := 0; i < len(m.RolesAtOther); i++ {

		// value enum
		if err := m.validateRolesAtOtherItemsEnum("roles_at_other"+"."+strconv.Itoa(i), "body", m.RolesAtOther[i]); err != nil {
			return err
		}

	}

	return nil
}

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

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