// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

/*
 * (title)
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 0.0.0
 */

package openapi




// ConnectEventRequest - Represents a request for a connection event.
type ConnectEventRequest struct {

	Claims map[string][]string `json:"claims"`

	Query map[string][]string `json:"query"`

	Headers map[string][]string `json:"headers"`

	Subprotocols []string `json:"subprotocols"`

	ClientCertificates []ClientCertificateInfo `json:"clientCertificates"`
}

// AssertConnectEventRequestRequired checks if the required fields are not zero-ed
func AssertConnectEventRequestRequired(obj ConnectEventRequest) error {
	elements := map[string]interface{}{
		"claims": obj.Claims,
		"query": obj.Query,
		"headers": obj.Headers,
		"subprotocols": obj.Subprotocols,
		"clientCertificates": obj.ClientCertificates,
	}
	for name, el := range elements {
		if isZero := IsZeroValue(el); isZero {
			return &RequiredError{Field: name}
		}
	}

	for _, el := range obj.ClientCertificates {
		if err := AssertClientCertificateInfoRequired(el); err != nil {
			return err
		}
	}
	return nil
}

// AssertConnectEventRequestConstraints checks if the values respects the defined constraints
func AssertConnectEventRequestConstraints(obj ConnectEventRequest) error {
	for _, el := range obj.ClientCertificates {
		if err := AssertClientCertificateInfoConstraints(el); err != nil {
			return err
		}
	}
	return nil
}
