// 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"
)

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

func NewV2beta1VisualizationType(value V2beta1VisualizationType) *V2beta1VisualizationType {
	return &value
}

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

const (

	// V2beta1VisualizationTypeROCCURVE captures enum value "ROC_CURVE"
	V2beta1VisualizationTypeROCCURVE V2beta1VisualizationType = "ROC_CURVE"

	// V2beta1VisualizationTypeTFDV captures enum value "TFDV"
	V2beta1VisualizationTypeTFDV V2beta1VisualizationType = "TFDV"

	// V2beta1VisualizationTypeTFMA captures enum value "TFMA"
	V2beta1VisualizationTypeTFMA V2beta1VisualizationType = "TFMA"

	// V2beta1VisualizationTypeTABLE captures enum value "TABLE"
	V2beta1VisualizationTypeTABLE V2beta1VisualizationType = "TABLE"

	// V2beta1VisualizationTypeCUSTOM captures enum value "CUSTOM"
	V2beta1VisualizationTypeCUSTOM V2beta1VisualizationType = "CUSTOM"
)

// for schema
var v2beta1VisualizationTypeEnum []interface{}

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

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

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

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

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

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