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

// GetCharactersCharacterIDChatChannelsOKBodyItems get_characters_character_id_chat_channels_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdChatChannelsOKBodyItems

type GetCharactersCharacterIDChatChannelsOKBodyItems struct {

	// allowed
	// Required: true
	Allowed GetCharactersCharacterIDChatChannelsOKBodyItemsAllowed `json:"allowed"`

	// blocked
	// Required: true
	Blocked GetCharactersCharacterIDChatChannelsOKBodyItemsBlocked `json:"blocked"`

	// get_characters_character_id_chat_channels_channel_id
	//
	// Unique channel ID. Always negative for player-created channels. Permanent (CCP created) channels have a positive ID, but don't appear in the API
	// Required: true
	ChannelID *int32 `json:"channel_id"`

	// get_characters_character_id_chat_channels_comparison_key
	//
	// Normalized, unique string used to compare channel names
	// Required: true
	ComparisonKey *string `json:"comparison_key"`

	// get_characters_character_id_chat_channels_has_password
	//
	// Whether this is a password protected channel
	// Required: true
	HasPassword *bool `json:"has_password"`

	// get_characters_character_id_chat_channels_motd
	//
	// Message of the day for this channel
	// Required: true
	Motd *string `json:"motd"`

	// muted
	// Required: true
	Muted GetCharactersCharacterIDChatChannelsOKBodyItemsMuted `json:"muted"`

	// get_characters_character_id_chat_channels_name
	//
	// Displayed name of channel
	// Required: true
	Name *string `json:"name"`

	// operators
	// Required: true
	Operators GetCharactersCharacterIDChatChannelsOKBodyItemsOperators `json:"operators"`

	// get_characters_character_id_chat_channels_owner_id
	//
	// owner_id integer
	// Required: true
	OwnerID *int32 `json:"owner_id"`
}

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems allowed false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems blocked false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems channel_id false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems comparison_key false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems has_password false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems motd false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems muted false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems name false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems operators false */

/* polymorph getCharactersCharacterIdChatChannelsOKBodyItems owner_id false */

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

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

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

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

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

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

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

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

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

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

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

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

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateAllowed(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateBlocked(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateChannelID(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateComparisonKey(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateHasPassword(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateMotd(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateMuted(formats strfmt.Registry) error {

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

	return nil
}

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

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateOperators(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetCharactersCharacterIDChatChannelsOKBodyItems) validateOwnerID(formats strfmt.Registry) error {

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

	return nil
}

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

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