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

package run_model

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

import (
	"encoding/json"

	strfmt "github.com/go-openapi/strfmt"

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

// ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the
// `Value` type union.
//
//  The JSON representation for `NullValue` is JSON `null`.
//
//  - NULL_VALUE: Null value.
// swagger:model protobufNullValue
type ProtobufNullValue string

const (

	// ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE"
	ProtobufNullValueNULLVALUE ProtobufNullValue = "NULL_VALUE"
)

// for schema
var protobufNullValueEnum []interface{}

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

func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error {
	if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil {
		return err
	}
	return nil
}

// Validate validates this protobuf null value
func (m ProtobufNullValue) Validate(formats strfmt.Registry) error {
	var res []error

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

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