// Validate valides the current information stored into the structure.
Validate valides the current information stored into the structure.
// Validate valides the current information stored into the structure .
func (o *EnforcerRefresh) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateStringInList("debug", string(o.Debug), []string{"Counters", "Logs", "Packets", "PUState", "Pcap", "CoreDump"}, false); err != nil {
		errors = errors.Append(err)
	}
	if err := ValidateSemVer("migrationVersion", o.MigrationVersion); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateStringInList("refreshType", string(o.RefreshType), []string{"Debug", "Migration"}, false); err != nil {
		errors = errors.Append(err)
	}
	if err := ValidateTagsExpression("selector", o.Selector); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * EnforcerRefresh ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateStringInList ( " " , string ( o . Debug ) , [ ] string { " " , " " , " " , " " , " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if err := ValidateSemVer ( " " , o . MigrationVersion ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . RefreshType ) , [ ] string { " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if err := ValidateTagsExpression ( " " , o . Selector ) ; err != nil { errors = errors . Append ( err ) } if len ( requiredErrors ) > 0 { return requiredErrors } if len ( errors ) > 0 { return errors } return nil }
Validate valides the current information stored into the structure.
Validate valides the current information stored into the structure .