// Code generated by go-swagger; DO NOT EDIT.

package visualization_model

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// APIVisualizationType Type of visualization to be generated.
// This is required when creating the pipeline through CreateVisualization
// API.
//
// swagger:model apiVisualizationType
type APIVisualizationType string

func NewAPIVisualizationType(value APIVisualizationType) *APIVisualizationType {
	return &value
}

// Pointer returns a pointer to a freshly-allocated APIVisualizationType.
func (m APIVisualizationType) Pointer() *APIVisualizationType {
	return &m
}

const (

	// APIVisualizationTypeROCCURVE captures enum value "ROC_CURVE"
	APIVisualizationTypeROCCURVE APIVisualizationType = "ROC_CURVE"

	// APIVisualizationTypeTFDV captures enum value "TFDV"
	APIVisualizationTypeTFDV APIVisualizationType = "TFDV"

	// APIVisualizationTypeTFMA captures enum value "TFMA"
	APIVisualizationTypeTFMA APIVisualizationType = "TFMA"

	// APIVisualizationTypeTABLE captures enum value "TABLE"
	APIVisualizationTypeTABLE APIVisualizationType = "TABLE"

	// APIVisualizationTypeCUSTOM captures enum value "CUSTOM"
	APIVisualizationTypeCUSTOM APIVisualizationType = "CUSTOM"
)

// for schema
var apiVisualizationTypeEnum []interface{}

func init() {
	var res []APIVisualizationType
	if err := json.Unmarshal([]byte(`["ROC_CURVE","TFDV","TFMA","TABLE","CUSTOM"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiVisualizationTypeEnum = append(apiVisualizationTypeEnum, v)
	}
}

func (m APIVisualizationType) validateAPIVisualizationTypeEnum(path, location string, value APIVisualizationType) error {
	if err := validate.EnumCase(path, location, value, apiVisualizationTypeEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this api visualization type
func (m APIVisualizationType) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateAPIVisualizationTypeEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this api visualization type based on context it is used
func (m APIVisualizationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
