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

package ops

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

// UserbehaviorUBEventTp userbehavior u b event tp
//
// swagger:model userbehavior.UBEventTp
type UserbehaviorUBEventTp string

func NewUserbehaviorUBEventTp(value UserbehaviorUBEventTp) *UserbehaviorUBEventTp {
	return &value
}

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

const (

	// UserbehaviorUBEventTpTenant captures enum value "tenant"
	UserbehaviorUBEventTpTenant UserbehaviorUBEventTp = "tenant"

	// UserbehaviorUBEventTpCluster captures enum value "cluster"
	UserbehaviorUBEventTpCluster UserbehaviorUBEventTp = "cluster"
)

// for schema
var userbehaviorUBEventTpEnum []interface{}

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

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

// Validate validates this userbehavior u b event tp
func (m UserbehaviorUBEventTp) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this userbehavior u b event tp based on context it is used
func (m UserbehaviorUBEventTp) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
