// 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 *NamespacePolicyInfo) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateStringInList("PUIncomingTrafficAction", string(o.PUIncomingTrafficAction), []string{"Allow", "Reject", "Inherit"}, false); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateStringInList("PUOutgoingTrafficAction", string(o.PUOutgoingTrafficAction), []string{"Allow", "Reject", "Inherit"}, false); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * NamespacePolicyInfo ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateStringInList ( " " , string ( o . PUIncomingTrafficAction ) , [ ] string { " " , " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . PUOutgoingTrafficAction ) , [ ] string { " " , " " , " " } , false ) ; 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 .