func (o *JWKS) Validate() error {

	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}

	if err := elemental.ValidateStringInList("alg", string(o.Alg), []string{"RS256", "ES256"}, true); err != nil {
		errors = errors.Append(err)
	}

	if err := elemental.ValidateStringInList("curve", string(o.Curve), []string{"P256"}, true); err != nil {
		errors = errors.Append(err)
	}

	if err := elemental.ValidateStringInList("kty", string(o.Kty), []string{"RSA", "EC"}, true); 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.
// Validate valides the current information stored into the structure .
func (o *JWKS) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateStringInList("alg", string(o.Alg), []string{"RS256", "ES256"}, true); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateStringInList("curve", string(o.Curve), []string{"P256"}, true); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateStringInList("kty", string(o.Kty), []string{"RSA", "EC"}, true); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * JWKS ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateStringInList ( " " , string ( o . Alg ) , [ ] string { " " , " " } , true ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . Curve ) , [ ] string { " " } , true ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . Kty ) , [ ] string { " " , " " } , true ) ; 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 .