func (o *X509Certificate) Validate() error {

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

	if err := elemental.ValidateRequiredString("CSR", o.CSR); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}

	if err := elemental.ValidateStringInList("signer", string(o.Signer), []string{"Public", "System"}, false); err != nil {
		errors = errors.Append(err)
	}

	if o.SubjectOverride != nil {
		elemental.ResetDefaultForZeroValues(o.SubjectOverride)
		if err := o.SubjectOverride.Validate(); err != nil {
			errors = errors.Append(err)
		}
	}

	if err := elemental.ValidateStringInList("usage", string(o.Usage), []string{"Client", "Server", "ServerClient"}, 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.
// Validate valides the current information stored into the structure .
func (o *X509Certificate) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateRequiredString("CSR", o.CSR); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateStringInList("signer", string(o.Signer), []string{"Public", "System"}, false); err != nil {
		errors = errors.Append(err)
	}
	if o.SubjectOverride != nil {
		elemental.ResetDefaultForZeroValues(o.SubjectOverride)
		if err := o.SubjectOverride.Validate(); err != nil {
			errors = errors.Append(err)
		}
	}
	if err := elemental.ValidateStringInList("usage", string(o.Usage), []string{"Client", "Server", "ServerClient"}, false); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * X509Certificate ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateRequiredString ( " " , o . CSR ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . Signer ) , [ ] string { " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if o . SubjectOverride != nil { elemental . ResetDefaultForZeroValues ( o . SubjectOverride ) if err := o . SubjectOverride . Validate ( ) ; err != nil { errors = errors . Append ( err ) } } if err := elemental . ValidateStringInList ( " " , string ( o . Usage ) , [ ] 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 .