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

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

// DataflowBinaryEncodingMethod dataflow binary encoding method
//
// swagger:model dataflowBinaryEncodingMethod
type DataflowBinaryEncodingMethod string

func NewDataflowBinaryEncodingMethod(value DataflowBinaryEncodingMethod) *DataflowBinaryEncodingMethod {
	return &value
}

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

const (

	// DataflowBinaryEncodingMethodBASE64 captures enum value "BASE64"
	DataflowBinaryEncodingMethodBASE64 DataflowBinaryEncodingMethod = "BASE64"

	// DataflowBinaryEncodingMethodHEX captures enum value "HEX"
	DataflowBinaryEncodingMethodHEX DataflowBinaryEncodingMethod = "HEX"
)

// for schema
var dataflowBinaryEncodingMethodEnum []interface{}

func init() {
	var res []DataflowBinaryEncodingMethod
	if err := json.Unmarshal([]byte(`["BASE64","HEX"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		dataflowBinaryEncodingMethodEnum = append(dataflowBinaryEncodingMethodEnum, v)
	}
}

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

// Validate validates this dataflow binary encoding method
func (m DataflowBinaryEncodingMethod) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this dataflow binary encoding method based on context it is used
func (m DataflowBinaryEncodingMethod) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
