func (o *EnforcerReport) Validate() error {

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

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

	if err := elemental.ValidateStringInList("licenseType", string(o.LicenseType), []string{"Host", "Container"}, false); err != nil {
		errors = errors.Append(err)
	}

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

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

	if err := elemental.ValidateRequiredTime("timestamp", o.Timestamp); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}

	// Custom object validation.
	if err := ValidateEnforcerReport(o); 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 *EnforcerReport) Validate() error {
	errors := elemental.Errors{}
	requiredErrors := elemental.Errors{}
	if err := elemental.ValidateRequiredString("licenseType", string(o.LicenseType)); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateStringInList("licenseType", string(o.LicenseType), []string{"Host", "Container"}, false); err != nil {
		errors = errors.Append(err)
	}
	if err := elemental.ValidateRequiredString("name", o.Name); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateRequiredString("namespace", o.Namespace); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := elemental.ValidateRequiredTime("timestamp", o.Timestamp); err != nil {
		requiredErrors = requiredErrors.Append(err)
	}
	if err := ValidateEnforcerReport(o); err != nil {
		errors = errors.Append(err)
	}
	if len(requiredErrors) > 0 {
		return requiredErrors
	}
	if len(errors) > 0 {
		return errors
	}
	return nil
}
func ( o * EnforcerReport ) Validate ( ) error { errors := elemental . Errors { } requiredErrors := elemental . Errors { } if err := elemental . ValidateRequiredString ( " " , string ( o . LicenseType ) ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateStringInList ( " " , string ( o . LicenseType ) , [ ] string { " " , " " } , false ) ; err != nil { errors = errors . Append ( err ) } if err := elemental . ValidateRequiredString ( " " , o . Name ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateRequiredString ( " " , o . Namespace ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := elemental . ValidateRequiredTime ( " " , o . Timestamp ) ; err != nil { requiredErrors = requiredErrors . Append ( err ) } if err := ValidateEnforcerReport ( o ) ; 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 .
// Custom object validation.