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

// LogsType logs type
//
// swagger:model logs_type
type LogsType string

func NewLogsType(value LogsType) *LogsType {
	return &value
}

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

const (

	// LogsTypeHost captures enum value "host"
	LogsTypeHost LogsType = "host"

	// LogsTypeController captures enum value "controller"
	LogsTypeController LogsType = "controller"

	// LogsTypeAll captures enum value "all"
	LogsTypeAll LogsType = "all"

	// LogsTypeEmpty captures enum value ""
	LogsTypeEmpty LogsType = ""
)

// for schema
var logsTypeEnum []interface{}

func init() {
	var res []LogsType
	if err := json.Unmarshal([]byte(`["host","controller","all",""]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		logsTypeEnum = append(logsTypeEnum, v)
	}
}

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

// Validate validates this logs type
func (m LogsType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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