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

package models

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

// LogService20210330Action Action is a classification for Control-Plane actions.
//
// swagger:model log_service_20210330Action
type LogService20210330Action string

func NewLogService20210330Action(value LogService20210330Action) *LogService20210330Action {
	return &value
}

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

const (

	// LogService20210330ActionUNSET captures enum value "UNSET"
	LogService20210330ActionUNSET LogService20210330Action = "UNSET"

	// LogService20210330ActionREAD captures enum value "READ"
	LogService20210330ActionREAD LogService20210330Action = "READ"

	// LogService20210330ActionCREATE captures enum value "CREATE"
	LogService20210330ActionCREATE LogService20210330Action = "CREATE"

	// LogService20210330ActionUPDATE captures enum value "UPDATE"
	LogService20210330ActionUPDATE LogService20210330Action = "UPDATE"

	// LogService20210330ActionDELETE captures enum value "DELETE"
	LogService20210330ActionDELETE LogService20210330Action = "DELETE"
)

// for schema
var logService20210330ActionEnum []interface{}

func init() {
	var res []LogService20210330Action
	if err := json.Unmarshal([]byte(`["UNSET","READ","CREATE","UPDATE","DELETE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		logService20210330ActionEnum = append(logService20210330ActionEnum, v)
	}
}

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

// Validate validates this log service 20210330 action
func (m LogService20210330Action) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this log service 20210330 action based on context it is used
func (m LogService20210330Action) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
