// Validate checks the field values on Vhds with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
424498
func (m *Vhds) Validate() error {
	if m == nil {
		return nil
	}

	{
		tmp := m.GetConfigSource()

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

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

	return nil
}
6496
func (s HorizontalPodAutoscalerGeneratorV1) validate() error {
	if len(s.Name) == 0 {
		return fmt.Errorf("name must be specified")
	}
	if s.MaxReplicas < 1 {
		return fmt.Errorf("'max' is a required parameter and must be at least 1")
	}
	if s.MinReplicas > s.MaxReplicas {
		return fmt.Errorf("'max' must be greater than or equal to 'min'")
	}
	return nil
}
351004
func (*BytesSchema) Validate(v reflect.Value) bool {
	v = dereference(v)

	return v.Kind() == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8
}
1216511
func (d *EphemeralDisk) Validate() error {
	if d.SizeMB < 10 {
		return fmt.Errorf("minimum DiskMB value is 10; got %d", d.SizeMB)
	}
	return nil
}
116138
func (autoscalerStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	autoscaler := obj.(*autoscaling.HorizontalPodAutoscaler)
	return validation.ValidateHorizontalPodAutoscaler(autoscaler)
}
425162
func (d Domain) Validate(_ strfmt.Registry) error {
	if domainRegex.Match([]byte(d)) {
		return nil
	}

	return errInvalidDomain
}
1111145
func (v *Validator) Validate(x interface{}) error {
	jsv, err := v.validator()
	if err != nil {
		return err
	}
	return jsv.Validate(x)
}
352748
func (m *Client) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

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

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
878359
func (config Config) Validate() error {
	if config.FSM == nil {
		return errors.NotValidf("nil FSM")
	}
	if config.Logger == nil {
		return errors.NotValidf("nil Logger")
	}
	if config.StorageDir == "" {
		return errors.NotValidf("empty StorageDir")
	}
	if config.LocalID == "" {
		return errors.NotValidf("empty LocalID")
	}
	if config.SnapshotRetention < 0 {
		return errors.NotValidf("negative SnapshotRetention")
	}
	if config.Transport == nil {
		return errors.NotValidf("nil Transport")
	}
	if config.Clock == nil {
		return errors.NotValidf("nil Clock")
	}
	return nil
}
173108
func (m *Cluster_RingHashLbConfig) Validate() error {
	if m == nil {
		return nil
	}

	if wrapper := m.GetMinimumRingSize(); wrapper != nil {

		if wrapper.GetValue() > 8388608 {
			return Cluster_RingHashLbConfigValidationError{
				field:  "MinimumRingSize",
				reason: "value must be less than or equal to 8388608",
			}
		}

	}

	if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok {
		return Cluster_RingHashLbConfigValidationError{
			field:  "HashFunction",
			reason: "value must be one of the defined enum values",
		}
	}

	if wrapper := m.GetMaximumRingSize(); wrapper != nil {

		if wrapper.GetValue() > 8388608 {
			return Cluster_RingHashLbConfigValidationError{
				field:  "MaximumRingSize",
				reason: "value must be less than or equal to 8388608",
			}
		}

	}

	return nil
}
1260675
func (m *GrpcJsonTranscoder) Validate() error {
	if m == nil {
		return nil
	}

	if len(m.GetServices()) < 1 {
		return GrpcJsonTranscoderValidationError{
			field:  "Services",
			reason: "value must contain at least 1 item(s)",
		}
	}

	{
		tmp := m.GetPrintOptions()

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

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

	// no validation rules for MatchIncomingRequestRoute

	switch m.DescriptorSet.(type) {

	case *GrpcJsonTranscoder_ProtoDescriptor:
		// no validation rules for ProtoDescriptor

	case *GrpcJsonTranscoder_ProtoDescriptorBin:
		// no validation rules for ProtoDescriptorBin

	default:
		return GrpcJsonTranscoderValidationError{
			field:  "DescriptorSet",
			reason: "value is required",
		}

	}

	return nil
}
392498
func (i *IntRule) Validate(cv ctypes.ConfigValue) error {
	// Check that type is correct
	// when unmarshalling JSON numbers are converted to floats which is the reason
	// we are checking for integer below.
	// http://golang.org/pkg/encoding/json/#Marshal
	if cv.Type() != IntegerType && cv.Type() != FloatType {
		return wrongType(i.key, cv.Type(), IntegerType)
	}
	// Check minimum. Type should be safe now because of the check above.
	if i.minimum != nil && cv.(ctypes.ConfigValueInt).Value < *i.minimum {
		return errors.New(fmt.Sprintf("value is under minimum (%s value %d < %d)", i.key, cv.(ctypes.ConfigValueInt).Value, *i.minimum))
	}
	// Check maximum. Type should be safe now because of the check above.
	if i.maximum != nil && cv.(ctypes.ConfigValueInt).Value > *i.maximum {
		return errors.New(fmt.Sprintf("value is over maximum (%s value %d > %d)", i.key, cv.(ctypes.ConfigValueInt).Value, *i.maximum))
	}
	return nil
}
849694
func (i *I) Validate(ctx *Context) error {
	_, err := i.template(ctx)
	return err
}
45450
func (s *IndicesShrinkService) Validate() error {
	var invalid []string
	if s.source == "" {
		invalid = append(invalid, "Source")
	}
	if s.target == "" {
		invalid = append(invalid, "Target")
	}
	if len(invalid) > 0 {
		return fmt.Errorf("missing required fields: %v", invalid)
	}
	return nil
}
945338
func (p *Type) Validate() error {
	if p.BaseType != nil {
		p.Variant = TypeVariantBaseType
	} else if p.StructTypeDef != nil {
		p.Variant = TypeVariantStructTypeDef
	} else if p.MapTypeDef != nil {
		p.Variant = TypeVariantMapTypeDef
	} else if p.ArrayTypeDef != nil {
		p.Variant = TypeVariantArrayTypeDef
	} else if p.EnumTypeDef != nil {
		p.Variant = TypeVariantEnumTypeDef
	} else if p.UnionTypeDef != nil {
		p.Variant = TypeVariantUnionTypeDef
	} else if p.StringTypeDef != nil {
		p.Variant = TypeVariantStringTypeDef
	} else if p.BytesTypeDef != nil {
		p.Variant = TypeVariantBytesTypeDef
	} else if p.NumberTypeDef != nil {
		p.Variant = TypeVariantNumberTypeDef
	} else if p.AliasTypeDef != nil {
		p.Variant = TypeVariantAliasTypeDef
	} else {
		return fmt.Errorf("Type: Missing required variant")
	}
	return nil
}
1315431
func (m *HeaderValue) Validate() error {
	if m == nil {
		return nil
	}

	if l := len(m.GetKey()); l < 1 || l > 16384 {
		return HeaderValueValidationError{
			field:  "Key",
			reason: "value length must be between 1 and 16384 bytes, inclusive",
		}
	}

	if len(m.GetValue()) > 16384 {
		return HeaderValueValidationError{
			field:  "Value",
			reason: "value length must be at most 16384 bytes",
		}
	}

	return nil
}
1217156
func (d multiValidator) Validate(s interface{}) error {
	for _, validator := range d {
		if err := validator.Validate(s); err != nil {
			return err
		}
	}

	return nil
}