// validateSince carries on validations for parameter Since
339321
func (o *GetTaskCommentsParams) validateSince(formats strfmt.Registry) error {

	if err := validate.FormatOf("since", "query", "date-time", o.Since.String(), formats); err != nil {
		return err
	}
	return nil
}
1308090
func (cfg ManifoldConfig) Validate() error {
	if cfg.APICallerName == "" {
		return errors.NotValidf("empty APICallerName")
	}
	if cfg.NewExternalControllerWatcherClient == nil {
		return errors.NotValidf("nil NewExternalControllerWatcherClient")
	}
	return nil
}
91653
func Validate(plugins []admission.Interface) error {
	for _, plugin := range plugins {
		if validater, ok := plugin.(admission.InitializationValidator); ok {
			err := validater.ValidateInitialization()
			if err != nil {
				return err
			}
		}
	}
	return nil
}
722821
func (config Config) Validate() error {
	if config.Facade == nil {
		return errors.NotValidf("nil Facade")
	}
	if config.CredentialAPI == nil {
		return errors.NotValidf("nil CredentialAPI")
	}
	if config.Destroyer == nil {
		return errors.NotValidf("nil Destroyer")
	}
	return nil
}
489092
func (c *Config) Validate() error {
	if c.Facade == nil {
		return errors.New("missing Facade")
	}
	if c.Clock == nil {
		return errors.New("missing Clock")
	}
	return nil
}
173273
func (r *InRule) Validate(value interface{}) error {
	value, isNil := Indirect(value)
	if isNil || IsEmpty(value) {
		return nil
	}

	for _, e := range r.elements {
		if e == value {
			return nil
		}
	}
	return errors.New(r.message)
}
1233212
func (c *UploadBinariesConfig) Validate() error {
	if c.CharmDownloader == nil {
		return errors.NotValidf("missing CharmDownloader")
	}
	if c.CharmUploader == nil {
		return errors.NotValidf("missing CharmUploader")
	}
	if c.ToolsDownloader == nil {
		return errors.NotValidf("missing ToolsDownloader")
	}
	if c.ToolsUploader == nil {
		return errors.NotValidf("missing ToolsUploader")
	}
	if c.ResourceDownloader == nil {
		return errors.NotValidf("missing ResourceDownloader")
	}
	if c.ResourceUploader == nil {
		return errors.NotValidf("missing ResourceUploader")
	}
	return nil
}
1124964
func (config Config) Validate() error {
	if config.ApplicationGetter == nil {
		return errors.NotValidf("missing ApplicationGetter")
	}
	if config.ApplicationUpdater == nil {
		return errors.NotValidf("missing ApplicationUpdater")
	}
	if config.ServiceBroker == nil {
		return errors.NotValidf("missing ServiceBroker")
	}
	if config.ContainerBroker == nil {
		return errors.NotValidf("missing ContainerBroker")
	}
	if config.ProvisioningInfoGetter == nil {
		return errors.NotValidf("missing ProvisioningInfoGetter")
	}
	if config.LifeGetter == nil {
		return errors.NotValidf("missing LifeGetter")
	}
	if config.UnitUpdater == nil {
		return errors.NotValidf("missing UnitUpdater")
	}
	if config.ProvisioningStatusSetter == nil {
		return errors.NotValidf("missing ProvisioningStatusSetter")
	}
	return nil
}
861305
func (m *Filter) Validate() error {
	if m == nil {
		return nil
	}

	if len(m.GetName()) < 1 {
		return FilterValidationError{
			field:  "Name",
			reason: "value length must be at least 1 bytes",
		}
	}

	switch m.ConfigType.(type) {

	case *Filter_Config:

		{
			tmp := m.GetConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return FilterValidationError{
						field:  "Config",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	case *Filter_TypedConfig:

		{
			tmp := m.GetTypedConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return FilterValidationError{
						field:  "TypedConfig",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	return nil
}
328527
func (c *Config) Validate() error {
	if c.API == nil {
		return errors.NotValidf("missing API")
	}
	if c.InProcessUpdate == nil {
		return errors.NotValidf("missing InProcessUpdate")
	}
	if c.Logger == nil {
		return errors.NotValidf("missing Logger")
	}
	return nil
}
983997
func isInvalid(err error) bool {
	pe, ok := err.(*os.PathError)
	if !ok {
		return false
	}

	errstr := pe.Err.Error()
	return errstr == errInvalidUnix || errstr == errInvalidWindows
}
1076236
func (config Config) Validate() error {
	if config.Facade == nil {
		return errors.NotValidf("nil Facade")
	}
	return nil
}
582579
func (v *PutBucketExternalMirrorInput) Validate() error {

	if v.SourceSite == nil {
		return errors.ParameterRequiredError{
			ParameterName: "SourceSite",
			ParentName:    "PutBucketExternalMirrorInput",
		}
	}

	return nil
}
1312075
func (m *ResourceMonitor) Validate() error {
	if m == nil {
		return nil
	}

	if len(m.GetName()) < 1 {
		return ResourceMonitorValidationError{
			field:  "Name",
			reason: "value length must be at least 1 bytes",
		}
	}

	switch m.ConfigType.(type) {

	case *ResourceMonitor_Config:

		{
			tmp := m.GetConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return ResourceMonitorValidationError{
						field:  "Config",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	case *ResourceMonitor_TypedConfig:

		{
			tmp := m.GetTypedConfig()

			if v, ok := interface{}(tmp).(interface{ Validate() error }); ok {

				if err := v.Validate(); err != nil {
					return ResourceMonitorValidationError{
						field:  "TypedConfig",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	return nil
}
368575
func (config ManifoldConfig) Validate() error {
	if config.AgentName == "" {
		return errors.NotValidf("empty AgentName")
	}
	if config.ClockName == "" {
		return errors.NotValidf("empty ClockName")
	}
	if config.ControllerPortName == "" {
		return errors.NotValidf("empty ControllerPortName")
	}
	if config.StateName == "" {
		return errors.NotValidf("empty StateName")
	}
	if config.Hub == nil {
		return errors.NotValidf("nil Hub")
	}
	if config.NewWorker == nil {
		return errors.NotValidf("nil NewWorker")
	}
	return nil
}
291512
func (a *Plugin) ValidateInitialization() error {
	if err := a.Webhook.ValidateInitialization(); err != nil {
		return err
	}
	return nil
}
347694
func ValidateDevNonce(db sqlx.Queryer, joinEUI, devEUI lorawan.EUI64, nonce lorawan.DevNonce, joinType lorawan.JoinType) error {
	var count int
	err := sqlx.Get(db, &count, `
		select
			count(*)
		from
			device_activation
		where
			dev_eui = $1
			and join_eui = $2
			and dev_nonce = $3
			and join_req_type = $4`,
		devEUI,
		joinEUI,
		nonce,
		joinType,
	)
	if err != nil {
		return handlePSQLError(err, "select error")
	}

	if count != 0 {
		return ErrAlreadyExists
	}

	return nil
}