func (m *CreateEnvironmentInput) validateProviderEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, createEnvironmentInputTypeProviderPropEnum); 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 CreateEnvironmentInput struct {
	ComplianceFamilies []string `json:"compliance_families"`
	Name string `json:"name,omitempty"`
	Provider string `json:"provider,omitempty"`
	ProviderOptions *ProviderOptions `json:"provider_options,omitempty"`
	RemediateResourceTypes []string `json:"remediate_resource_types"`
	ScanInterval *int64 `json:"scan_interval,omitempty"`
	ScanScheduleEnabled *bool `json:"scan_schedule_enabled,omitempty"`
	SurveyResourceTypes []string `json:"survey_resource_types"`
}
func (m *CreateEnvironmentInput) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateProvider(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateProviderOptions(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateScanInterval(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
var createEnvironmentInputTypeProviderPropEnum []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 {
		createEnvironmentInputTypeProviderPropEnum = append(createEnvironmentInputTypeProviderPropEnum, v)
	}
}
const (
	CreateEnvironmentInputProviderAws string = "aws"
	CreateEnvironmentInputProviderAwsGovcloud string = "aws_govcloud"
	CreateEnvironmentInputProviderAzure string = "azure"
	CreateEnvironmentInputProviderGoogle string = "google"
)