// 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 *Authz) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateRequiredExternal("claims", o.Claims); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	for _, sub := range o.PolicyRulesList {
		if sub == nil {
			continue
		}
		elemental.ResetDefaultForZeroValues(sub)
		if err := sub.Validate(); err != nil {
			errors = errors.Append(err)
		}
	}
	if err := elemental.ValidateRequiredString("targetNamespace", o.TargetNamespace); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * Authz ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateRequiredExternal ( " " , o . Claims ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } for _ , sub := range o . PolicyRulesList { if sub == nil { continue } elemental . ResetDefaultForZeroValues ( sub ) if err := sub . Validate ( ) ; err != nil { errors = errors . Append ( err ) } } if err := elemental . ValidateRequiredString ( " " , o . TargetNamespace ) ; err != nil { requiredErrors = requiredErrors . 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 .