// Validate validates the registrations in the OauthSampleAPI
548680
func (o *OauthSampleAPI) Validate() error {
	var unregistered []string

	if o.JSONConsumer == nil {
		unregistered = append(unregistered, "JSONConsumer")
	}

	if o.JSONProducer == nil {
		unregistered = append(unregistered, "JSONProducer")
	}

	if o.OauthSecurityAuth == nil {
		unregistered = append(unregistered, "OauthSecurityAuth")
	}

	if o.GetAuthCallbackHandler == nil {
		unregistered = append(unregistered, "GetAuthCallbackHandler")
	}

	if o.GetLoginHandler == nil {
		unregistered = append(unregistered, "GetLoginHandler")
	}

	if o.CustomersCreateHandler == nil {
		unregistered = append(unregistered, "customers.CreateHandler")
	}

	if o.CustomersGetIDHandler == nil {
		unregistered = append(unregistered, "customers.GetIDHandler")
	}

	if len(unregistered) > 0 {
		return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
	}

	return nil
}
666436
func (o *CiliumHealthAPI) Validate() error {
	var unregistered []string

	if o.JSONConsumer == nil {
		unregistered = append(unregistered, "JSONConsumer")
	}

	if o.JSONProducer == nil {
		unregistered = append(unregistered, "JSONProducer")
	}

	if o.GetHealthzHandler == nil {
		unregistered = append(unregistered, "GetHealthzHandler")
	}

	if o.GetHelloHandler == nil {
		unregistered = append(unregistered, "GetHelloHandler")
	}

	if o.ConnectivityGetStatusHandler == nil {
		unregistered = append(unregistered, "connectivity.GetStatusHandler")
	}

	if o.ConnectivityPutStatusProbeHandler == nil {
		unregistered = append(unregistered, "connectivity.PutStatusProbeHandler")
	}

	if len(unregistered) > 0 {
		return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
	}

	return nil
}
754479
func (config Config) Validate() error {
	if config.APIInfo == nil {
		return errors.NotValidf("nil APIInfo")
	}
	if config.Authenticator == nil {
		return errors.NotValidf("nil Authenticator")
	}
	if config.DialConn == nil {
		return errors.NotValidf("nil DialConn")
	}
	if config.Hub == nil {
		return errors.NotValidf("nil Hub")
	}
	if config.Mux == nil {
		return errors.NotValidf("nil Mux")
	}
	if config.Path == "" {
		return errors.NotValidf("empty Path")
	}
	if config.LocalID == "" {
		return errors.NotValidf("empty LocalID")
	}
	if config.TLSConfig == nil {
		return errors.NotValidf("nil TLSConfig")
	}
	return nil
}
234081
func (c *ManifoldConfig) Validate() error {
	if c.AgentName == "" {
		return errors.NotValidf("missing AgentName")
	}
	if c.CentralHubName == "" {
		return errors.NotValidf("missing CentralHubName")
	}
	if c.StateConfigWatcherName == "" {
		return errors.NotValidf("missing StateConfigWatcherName")
	}
	if c.Recorder == nil {
		return errors.NotValidf("missing Recorder")
	}
	if c.Logger == nil {
		return errors.NotValidf("missing Logger")
	}
	if c.NewWorker == nil {
		return errors.NotValidf("missing NewWorker")
	}
	return nil
}
16437
func (a *Plugin) Validate(attr admission.Attributes, o admission.ObjectInterfaces) error {
	return a.Webhook.Dispatch(attr, o)
}
425162
func (d Domain) Validate(_ strfmt.Registry) error {
	if domainRegex.Match([]byte(d)) {
		return nil
	}

	return errInvalidDomain
}
92173
func (config ManifoldConfig) Validate() error {
	if config.AgentName == "" {
		return errors.NotValidf("empty AgentName")
	}
	if config.StateConfigWatcherName == "" {
		return errors.NotValidf("empty StateConfigWatcherName")
	}
	if config.OpenStatePool == nil {
		return errors.NotValidf("nil OpenStatePool")
	}
	if config.SetStatePool == nil {
		return errors.NotValidf("nil SetStatePool")
	}
	return nil
}
877010
func (c *Certificate) Validate() error {
	if len(c.CertPEM) == 0 {
		return errors.NotValidf("missing cert PEM")
	}
	if len(c.KeyPEM) == 0 {
		return errors.NotValidf("missing key PEM")
	}
	return nil
}
10294
func (a *ACLToken) Validate() error {
	var mErr multierror.Error
	if len(a.Name) > maxTokenNameLength {
		mErr.Errors = append(mErr.Errors, fmt.Errorf("token name too long"))
	}
	switch a.Type {
	case ACLClientToken:
		if len(a.Policies) == 0 {
			mErr.Errors = append(mErr.Errors, fmt.Errorf("client token missing policies"))
		}
	case ACLManagementToken:
		if len(a.Policies) != 0 {
			mErr.Errors = append(mErr.Errors, fmt.Errorf("management token cannot be associated with policies"))
		}
	default:
		mErr.Errors = append(mErr.Errors, fmt.Errorf("token type must be client or management"))
	}
	return mErr.ErrorOrNil()
}
1068284
func (m *BPFMap) Validate(formats strfmt.Registry) error {
	var res []error

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
417513
func (config ManifoldConfig) Validate() error {
	if config.StateName == "" {
		return errors.NotValidf("empty StateName")
	}
	if config.Logger == nil {
		return errors.NotValidf("missing Logger")
	}
	if config.PrometheusRegisterer == nil {
		return errors.NotValidf("missing PrometheusRegisterer")
	}
	if config.NewWorker == nil {
		return errors.NotValidf("missing NewWorker func")
	}
	return nil
}
117091
func (o *CiliumAPI) Validate() error {
	var unregistered []string

	if o.JSONConsumer == nil {
		unregistered = append(unregistered, "JSONConsumer")
	}

	if o.JSONProducer == nil {
		unregistered = append(unregistered, "JSONProducer")
	}

	if o.EndpointDeleteEndpointIDHandler == nil {
		unregistered = append(unregistered, "endpoint.DeleteEndpointIDHandler")
	}

	if o.PolicyDeleteFqdnCacheHandler == nil {
		unregistered = append(unregistered, "policy.DeleteFqdnCacheHandler")
	}

	if o.IPAMDeleteIPAMIPHandler == nil {
		unregistered = append(unregistered, "ipam.DeleteIPAMIPHandler")
	}

	if o.PolicyDeletePolicyHandler == nil {
		unregistered = append(unregistered, "policy.DeletePolicyHandler")
	}

	if o.ServiceDeleteServiceIDHandler == nil {
		unregistered = append(unregistered, "service.DeleteServiceIDHandler")
	}

	if o.DaemonGetConfigHandler == nil {
		unregistered = append(unregistered, "daemon.GetConfigHandler")
	}

	if o.DaemonGetDebuginfoHandler == nil {
		unregistered = append(unregistered, "daemon.GetDebuginfoHandler")
	}

	if o.EndpointGetEndpointHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointHandler")
	}

	if o.EndpointGetEndpointIDHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointIDHandler")
	}

	if o.EndpointGetEndpointIDConfigHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointIDConfigHandler")
	}

	if o.EndpointGetEndpointIDHealthzHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointIDHealthzHandler")
	}

	if o.EndpointGetEndpointIDLabelsHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointIDLabelsHandler")
	}

	if o.EndpointGetEndpointIDLogHandler == nil {
		unregistered = append(unregistered, "endpoint.GetEndpointIDLogHandler")
	}

	if o.PolicyGetFqdnCacheHandler == nil {
		unregistered = append(unregistered, "policy.GetFqdnCacheHandler")
	}

	if o.PolicyGetFqdnCacheIDHandler == nil {
		unregistered = append(unregistered, "policy.GetFqdnCacheIDHandler")
	}

	if o.DaemonGetHealthzHandler == nil {
		unregistered = append(unregistered, "daemon.GetHealthzHandler")
	}

	if o.PolicyGetIdentityHandler == nil {
		unregistered = append(unregistered, "policy.GetIdentityHandler")
	}

	if o.PolicyGetIdentityEndpointsHandler == nil {
		unregistered = append(unregistered, "policy.GetIdentityEndpointsHandler")
	}

	if o.PolicyGetIdentityIDHandler == nil {
		unregistered = append(unregistered, "policy.GetIdentityIDHandler")
	}

	if o.DaemonGetMapHandler == nil {
		unregistered = append(unregistered, "daemon.GetMapHandler")
	}

	if o.DaemonGetMapNameHandler == nil {
		unregistered = append(unregistered, "daemon.GetMapNameHandler")
	}

	if o.MetricsGetMetricsHandler == nil {
		unregistered = append(unregistered, "metrics.GetMetricsHandler")
	}

	if o.PolicyGetPolicyHandler == nil {
		unregistered = append(unregistered, "policy.GetPolicyHandler")
	}

	if o.PolicyGetPolicyResolveHandler == nil {
		unregistered = append(unregistered, "policy.GetPolicyResolveHandler")
	}

	if o.PrefilterGetPrefilterHandler == nil {
		unregistered = append(unregistered, "prefilter.GetPrefilterHandler")
	}

	if o.ServiceGetServiceHandler == nil {
		unregistered = append(unregistered, "service.GetServiceHandler")
	}

	if o.ServiceGetServiceIDHandler == nil {
		unregistered = append(unregistered, "service.GetServiceIDHandler")
	}

	if o.DaemonPatchConfigHandler == nil {
		unregistered = append(unregistered, "daemon.PatchConfigHandler")
	}

	if o.EndpointPatchEndpointIDHandler == nil {
		unregistered = append(unregistered, "endpoint.PatchEndpointIDHandler")
	}

	if o.EndpointPatchEndpointIDConfigHandler == nil {
		unregistered = append(unregistered, "endpoint.PatchEndpointIDConfigHandler")
	}

	if o.EndpointPatchEndpointIDLabelsHandler == nil {
		unregistered = append(unregistered, "endpoint.PatchEndpointIDLabelsHandler")
	}

	if o.PrefilterPatchPrefilterHandler == nil {
		unregistered = append(unregistered, "prefilter.PatchPrefilterHandler")
	}

	if o.IPAMPostIPAMHandler == nil {
		unregistered = append(unregistered, "ipam.PostIPAMHandler")
	}

	if o.IPAMPostIPAMIPHandler == nil {
		unregistered = append(unregistered, "ipam.PostIPAMIPHandler")
	}

	if o.EndpointPutEndpointIDHandler == nil {
		unregistered = append(unregistered, "endpoint.PutEndpointIDHandler")
	}

	if o.PolicyPutPolicyHandler == nil {
		unregistered = append(unregistered, "policy.PutPolicyHandler")
	}

	if o.ServicePutServiceIDHandler == nil {
		unregistered = append(unregistered, "service.PutServiceIDHandler")
	}

	if len(unregistered) > 0 {
		return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", "))
	}

	return nil
}
848013
func (s strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	auth := obj.(*oauthapi.OAuthClientAuthorization)
	validationErrors := validation.ValidateClientAuthorization(auth)

	client, err := s.clientGetter.Get(auth.ClientName, metav1.GetOptions{})
	if err != nil {
		return append(validationErrors, field.InternalError(field.NewPath("clientName"), err))
	}
	if err := scopeauthorizer.ValidateScopeRestrictions(client, auth.Scopes...); err != nil {
		return append(validationErrors, field.InternalError(field.NewPath("clientName"), err))
	}

	return validationErrors
}
840074
func (r *GetOAuthTokenRequest) Validate() error {
	switch {
	case len(r.Scopes) == 0:
		return errors.New(`field "scopes" is required`)
	case len(r.Secret) == 0:
		return errors.New(`field "secret" is required`)
	case r.AccountID == "":
		return errors.New(`field "account_id" is required`)
	}
	return nil
}
723544
func (rs *Registrations) Validate(internalcfg *kubeadmapi.ClusterConfiguration) field.ErrorList {
	allErrs := field.ErrorList{}
	for kind, registration := range *rs {
		allErrs = append(allErrs, registration.ValidateFunc(internalcfg, field.NewPath(string(kind)))...)
	}
	return allErrs
}
28313
func (m *IPAMStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
137511
func (m *Error) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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