func (m *CustomRule) validateSeverityEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, customRuleTypeSeverityPropEnum); err != nil {
		return err
	}
	return nil
}
prop value enum
package models
import (
	"encoding/json"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type CustomRule struct {
	ComplianceControls []string `json:"compliance_controls"`
	CreatedAt int64 `json:"created_at,omitempty"`
	CreatedBy string `json:"created_by,omitempty"`
	CreatedByDisplayName string `json:"created_by_display_name,omitempty"`
	Description string `json:"description,omitempty"`
	Families []string `json:"families"`
	ID string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Provider string `json:"provider,omitempty"`
	ResourceType string `json:"resource_type,omitempty"`
	RuleText string `json:"rule_text,omitempty"`
	Severity string `json:"severity,omitempty"`
	Source string `json:"source,omitempty"`
	Status string `json:"status,omitempty"`
	UpdatedAt int64 `json:"updated_at,omitempty"`
	UpdatedBy string `json:"updated_by,omitempty"`
	UpdatedByDisplayName string `json:"updated_by_display_name,omitempty"`
}
func (m *CustomRule) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateProvider(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSeverity(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSource(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateStatus(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
var customRuleTypeProviderPropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["AWS","AWS_GOVCLOUD","AZURE","GOOGLE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		customRuleTypeProviderPropEnum = append(customRuleTypeProviderPropEnum, v)
	}
}
const (
	CustomRuleProviderAWS string = "AWS"
	CustomRuleProviderAWSGOVCLOUD string = "AWS_GOVCLOUD"
	CustomRuleProviderAZURE string = "AZURE"
	CustomRuleProviderGOOGLE string = "GOOGLE"
)
func (m *CustomRule) validateProviderEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, customRuleTypeProviderPropEnum); err != nil {
		return err
	}
	return nil
}
func (m *CustomRule) validateProvider(formats strfmt.Registry) error {
	if swag.IsZero(m.Provider) {  
		return nil
	}
	if err := m.validateProviderEnum("provider", "body", m.Provider); err != nil {
		return err
	}
	return nil
}
var customRuleTypeSeverityPropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["Informational","Low","Medium","High","Critical"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		customRuleTypeSeverityPropEnum = append(customRuleTypeSeverityPropEnum, v)
	}
}
const (
	CustomRuleSeverityInformational string = "Informational"
	CustomRuleSeverityLow string = "Low"
	CustomRuleSeverityMedium string = "Medium"
	CustomRuleSeverityHigh string = "High"
	CustomRuleSeverityCritical string = "Critical"
)