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

// LogsState logs state
//
// swagger:model logs_state
type LogsState string

func NewLogsState(value LogsState) *LogsState {
	return &value
}

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

const (

	// LogsStateRequested captures enum value "requested"
	LogsStateRequested LogsState = "requested"

	// LogsStateCollecting captures enum value "collecting"
	LogsStateCollecting LogsState = "collecting"

	// LogsStateCompleted captures enum value "completed"
	LogsStateCompleted LogsState = "completed"

	// LogsStateTimeout captures enum value "timeout"
	LogsStateTimeout LogsState = "timeout"

	// LogsStateEmpty captures enum value ""
	LogsStateEmpty LogsState = ""
)

// for schema
var logsStateEnum []interface{}

func init() {
	var res []LogsState
	if err := json.Unmarshal([]byte(`["requested","collecting","completed","timeout",""]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		logsStateEnum = append(logsStateEnum, v)
	}
}

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

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

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

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

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