// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid.
// Validate inspects the fields of the type to determine if they are valid .
func (s *RadiusSettings) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RadiusSettings"}
	if s.DisplayLabel != nil && len(*s.DisplayLabel) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("DisplayLabel", 1))
	}
	if s.RadiusPort != nil && *s.RadiusPort < 1025 {
		invalidParams.Add(request.NewErrParamMinValue("RadiusPort", 1025))
	}
	if s.RadiusTimeout != nil && *s.RadiusTimeout < 1 {
		invalidParams.Add(request.NewErrParamMinValue("RadiusTimeout", 1))
	}
	if s.SharedSecret != nil && len(*s.SharedSecret) < 8 {
		invalidParams.Add(request.NewErrParamMinLen("SharedSecret", 8))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * RadiusSettings ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . DisplayLabel != nil && len ( * s . DisplayLabel ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . RadiusPort != nil && * s . RadiusPort < 1025 { invalidParams . Add ( request . NewErrParamMinValue ( " " , 1025 ) ) } if s . RadiusTimeout != nil && * s . RadiusTimeout < 1 { invalidParams . Add ( request . NewErrParamMinValue ( " " , 1 ) ) } if s . SharedSecret != nil && len ( * s . SharedSecret ) < 8 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 8 ) ) } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .