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

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

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

// PutCharactersCharacterIDCalendarEventIDParamsBody put_characters_character_id_calendar_event_id_response
//
// response schema
// swagger:model putCharactersCharacterIdCalendarEventIdParamsBody

type PutCharactersCharacterIDCalendarEventIDParamsBody struct {

	// put_characters_character_id_calendar_event_id_response
	//
	// response string
	// Required: true
	Response *string `json:"response"`
}

/* polymorph putCharactersCharacterIdCalendarEventIdParamsBody response false */

// Validate validates this put characters character Id calendar event Id params body
func (m *PutCharactersCharacterIDCalendarEventIDParamsBody) Validate(formats strfmt.Registry) error {
	var res []error

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

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

var putCharactersCharacterIdCalendarEventIdParamsBodyTypeResponsePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["accepted","declined","tentative"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		putCharactersCharacterIdCalendarEventIdParamsBodyTypeResponsePropEnum = append(putCharactersCharacterIdCalendarEventIdParamsBodyTypeResponsePropEnum, v)
	}
}

const (
	// PutCharactersCharacterIDCalendarEventIDParamsBodyResponseAccepted captures enum value "accepted"
	PutCharactersCharacterIDCalendarEventIDParamsBodyResponseAccepted string = "accepted"
	// PutCharactersCharacterIDCalendarEventIDParamsBodyResponseDeclined captures enum value "declined"
	PutCharactersCharacterIDCalendarEventIDParamsBodyResponseDeclined string = "declined"
	// PutCharactersCharacterIDCalendarEventIDParamsBodyResponseTentative captures enum value "tentative"
	PutCharactersCharacterIDCalendarEventIDParamsBodyResponseTentative string = "tentative"
)

// prop value enum
func (m *PutCharactersCharacterIDCalendarEventIDParamsBody) validateResponseEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, putCharactersCharacterIdCalendarEventIdParamsBodyTypeResponsePropEnum); err != nil {
		return err
	}
	return nil
}

func (m *PutCharactersCharacterIDCalendarEventIDParamsBody) validateResponse(formats strfmt.Registry) error {

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

	// value enum
	if err := m.validateResponseEnum("response", "body", *m.Response); err != nil {
		return err
	}

	return nil
}

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

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