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

// GetCharactersCharacterIDMailListsOKBodyItems get_characters_character_id_mail_lists_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdMailListsOKBodyItems

type GetCharactersCharacterIDMailListsOKBodyItems struct {

	// get_characters_character_id_mail_lists_mailing_list_id
	//
	// Mailing list ID
	// Required: true
	MailingListID *int32 `json:"mailing_list_id"`

	// get_characters_character_id_mail_lists_name
	//
	// name string
	// Required: true
	Name *string `json:"name"`
}

/* polymorph getCharactersCharacterIdMailListsOKBodyItems mailing_list_id false */

/* polymorph getCharactersCharacterIdMailListsOKBodyItems name false */

// Validate validates this get characters character Id mail lists o k body items
func (m *GetCharactersCharacterIDMailListsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *GetCharactersCharacterIDMailListsOKBodyItems) validateMailingListID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDMailListsOKBodyItems) validateName(formats strfmt.Registry) error {

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

	return nil
}

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

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