// Validate validates a new egress network policy
334309
func (enpStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	return validation.ValidateEgressNetworkPolicy(obj.(*networkapi.EgressNetworkPolicy))
}
1124467
func (c *ChannelsCreateCall) Validate(validate bool) *ChannelsCreateCall {
	c.validate = validate
	return c
}
744910
func (m *EndpointPolicy) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	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
}
295427
func (cfg *Config) Validate() error {
	if len(cfg.Key) == 0 {
		return trace.BadParameter(`etcd: missing "prefix" setting`)
	}
	if len(cfg.Nodes) == 0 {
		return trace.BadParameter(`etcd: missing "peers" setting`)
	}
	if cfg.Insecure == false {
		if cfg.TLSKeyFile == "" {
			return trace.BadParameter(`etcd: missing "tls_key_file" setting`)
		}
		if cfg.TLSCertFile == "" {
			return trace.BadParameter(`etcd: missing "tls_cert_file" setting`)
		}
		if cfg.TLSCAFile == "" {
			return trace.BadParameter(`etcd: missing "tls_ca_file" setting`)
		}
	}
	if cfg.BufferSize == 0 {
		cfg.BufferSize = backend.DefaultBufferSize
	}
	if cfg.DialTimeout == 0 {
		cfg.DialTimeout = defaults.DefaultDialTimeout
	}
	return nil
}
1367279
func (c ConnectedConfig) Validate() error {
	if c.Runner == nil {
		return errors.New("hook runner not provided")
	}
	if c.StateFile == nil {
		return errors.New("state file not provided")
	}
	if c.Status == nil {
		return errors.New("meter status API client not provided")
	}
	return nil
}
360416
func (v *ImageProcessInput) Validate() error {

	if v.Action == nil {
		return errors.ParameterRequiredError{
			ParameterName: "Action",
			ParentName:    "ImageProcessInput",
		}
	}

	return nil
}
676369
func (spec *MigrationSpec) Validate() error {
	if !names.IsValidUser(spec.InitiatedBy.Id()) {
		return errors.NotValidf("InitiatedBy")
	}
	return spec.TargetInfo.Validate()
}
535066
func (c *ChannelsJoinCall) Validate(validate bool) *ChannelsJoinCall {
	c.validate = validate
	return c
}
687789
func (cc *ChannelConfig) Validate() error {
	for _, validator := range []func() error{
		cc.validateHashingAlgorithm,
		cc.validateBlockDataHashingStructure,
		cc.validateOrdererAddresses,
	} {
		if err := validator(); err != nil {
			return err
		}
	}

	return nil
}
1022045
func (m *ThriftProtocolOptions) Validate() error {
	if m == nil {
		return nil
	}

	if _, ok := TransportType_name[int32(m.GetTransport())]; !ok {
		return ThriftProtocolOptionsValidationError{
			field:  "Transport",
			reason: "value must be one of the defined enum values",
		}
	}

	if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok {
		return ThriftProtocolOptionsValidationError{
			field:  "Protocol",
			reason: "value must be one of the defined enum values",
		}
	}

	return nil
}
73762
func (r *RouteDefinition) Validate() *dslengine.ValidationErrors {
	verr := new(dslengine.ValidationErrors)
	if r.Parent == nil {
		verr.Add(r, "missing route parent action")
	}
	return verr.AsError()
}
39540
func (config ManifoldConfig) Validate() error {
	if config.AgentName == "" {
		return errors.NotValidf("empty AgentName")
	}
	if config.APICallerName == "" {
		return errors.NotValidf("empty APICallerName")
	}
	if config.BrokerName == "" {
		return errors.NotValidf("empty BrokerName")
	}
	if config.ClockName == "" {
		return errors.NotValidf("empty ClockName")
	}
	if config.NewWorker == nil {
		return errors.NotValidf("nil NewWorker")
	}
	return nil
}
995267
func (m *Router) Validate() error {
	if m == nil {
		return nil
	}

	{
		tmp := m.GetDynamicStats()

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

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

	// no validation rules for StartChildSpan

	for idx, item := range m.GetUpstreamLog() {
		_, _ = idx, item

		{
			tmp := item

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

				if err := v.Validate(); err != nil {
					return RouterValidationError{
						field:  fmt.Sprintf("UpstreamLog[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		}

	}

	// no validation rules for SuppressEnvoyHeaders

	return nil
}
1306571
func (c *NetworkConfig) Validate(onExecution bool) error {
	if onExecution {
		if _, err := os.Stat(c.NetworkDir); err != nil {
			return errors.Wrapf(err, "invalid network_dir")
		}

		for _, pluginDir := range c.PluginDir {
			if err := os.MkdirAll(pluginDir, 0755); err != nil {
				return errors.Wrapf(err, "invalid plugin_dir entry")
			}
		}
	}

	return nil
}
862457
func (c *CronSchedule) Validate() error {
	if c.entry == "" {
		return ErrMissingCronEntry
	}
	_, err := cron.Parse(c.entry)
	if err != nil {
		return err
	}
	return nil
}
832615
func (eid ExternalID) Validate(_ strfmt.Registry) error {
	if idRegex.Match([]byte(eid)) {
		return nil
	}

	return errInvalidID
}