// Code generated by go-swagger; DO NOT EDIT.

package restmodels

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

// EventEndpointRegistration event endpoint registration
// swagger:model EventEndpointRegistration

type EventEndpointRegistration struct {

	// The type of event this URL should be notified of.
	Type string `json:"type,omitempty"`

	// The URL to notify on events.
	URL string `json:"url,omitempty"`
}

/* polymorph EventEndpointRegistration type false */

/* polymorph EventEndpointRegistration url false */

// Validate validates this event endpoint registration
func (m *EventEndpointRegistration) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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