// 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 (
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// CentralDebugPortalSignOutReq central debug portal sign out req
//
// swagger:model centralDebugPortalSignOutReq
type CentralDebugPortalSignOutReq struct {

	// redirect uri
	// Required: true
	RedirectURI *string `json:"redirect_uri"`

	// Whether the returned session key was placed in the cookie.
	// Required: true
	SessionKeyAsCookie bool `json:"session_key_as_cookie"`
}

// Validate validates this central debug portal sign out req
func (m *CentralDebugPortalSignOutReq) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *CentralDebugPortalSignOutReq) validateRedirectURI(formats strfmt.Registry) error {

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

	return nil
}

func (m *CentralDebugPortalSignOutReq) validateSessionKeyAsCookie(formats strfmt.Registry) error {

	if err := validate.Required("session_key_as_cookie", "body", bool(m.SessionKeyAsCookie)); err != nil {
		return err
	}

	return nil
}

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

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