// Code generated by "enumer -type=ImageCacheStatus -type=ImageCacheCopyStatus -linecomment -text"; DO NOT EDIT.

package cri

import (
	"fmt"
	"strings"
)

const _ImageCacheCopyStatusName = "unknownskippedcopyingready"

var _ImageCacheCopyStatusIndex = [...]uint8{0, 7, 14, 21, 26}

const _ImageCacheCopyStatusLowerName = "unknownskippedcopyingready"

func (i ImageCacheCopyStatus) String() string {
	if i < 0 || i >= ImageCacheCopyStatus(len(_ImageCacheCopyStatusIndex)-1) {
		return fmt.Sprintf("ImageCacheCopyStatus(%d)", i)
	}
	return _ImageCacheCopyStatusName[_ImageCacheCopyStatusIndex[i]:_ImageCacheCopyStatusIndex[i+1]]
}

// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _ImageCacheCopyStatusNoOp() {
	var x [1]struct{}
	_ = x[ImageCacheCopyStatusUnknown-(0)]
	_ = x[ImageCacheCopyStatusSkipped-(1)]
	_ = x[ImageCacheCopyStatusPending-(2)]
	_ = x[ImageCacheCopyStatusReady-(3)]
}

var _ImageCacheCopyStatusValues = []ImageCacheCopyStatus{ImageCacheCopyStatusUnknown, ImageCacheCopyStatusSkipped, ImageCacheCopyStatusPending, ImageCacheCopyStatusReady}

var _ImageCacheCopyStatusNameToValueMap = map[string]ImageCacheCopyStatus{
	_ImageCacheCopyStatusName[0:7]:        ImageCacheCopyStatusUnknown,
	_ImageCacheCopyStatusLowerName[0:7]:   ImageCacheCopyStatusUnknown,
	_ImageCacheCopyStatusName[7:14]:       ImageCacheCopyStatusSkipped,
	_ImageCacheCopyStatusLowerName[7:14]:  ImageCacheCopyStatusSkipped,
	_ImageCacheCopyStatusName[14:21]:      ImageCacheCopyStatusPending,
	_ImageCacheCopyStatusLowerName[14:21]: ImageCacheCopyStatusPending,
	_ImageCacheCopyStatusName[21:26]:      ImageCacheCopyStatusReady,
	_ImageCacheCopyStatusLowerName[21:26]: ImageCacheCopyStatusReady,
}

var _ImageCacheCopyStatusNames = []string{
	_ImageCacheCopyStatusName[0:7],
	_ImageCacheCopyStatusName[7:14],
	_ImageCacheCopyStatusName[14:21],
	_ImageCacheCopyStatusName[21:26],
}

// ImageCacheCopyStatusString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func ImageCacheCopyStatusString(s string) (ImageCacheCopyStatus, error) {
	if val, ok := _ImageCacheCopyStatusNameToValueMap[s]; ok {
		return val, nil
	}

	if val, ok := _ImageCacheCopyStatusNameToValueMap[strings.ToLower(s)]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to ImageCacheCopyStatus values", s)
}

// ImageCacheCopyStatusValues returns all values of the enum
func ImageCacheCopyStatusValues() []ImageCacheCopyStatus {
	return _ImageCacheCopyStatusValues
}

// ImageCacheCopyStatusStrings returns a slice of all String values of the enum
func ImageCacheCopyStatusStrings() []string {
	strs := make([]string, len(_ImageCacheCopyStatusNames))
	copy(strs, _ImageCacheCopyStatusNames)
	return strs
}

// IsAImageCacheCopyStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (i ImageCacheCopyStatus) IsAImageCacheCopyStatus() bool {
	for _, v := range _ImageCacheCopyStatusValues {
		if i == v {
			return true
		}
	}
	return false
}

// MarshalText implements the encoding.TextMarshaler interface for ImageCacheCopyStatus
func (i ImageCacheCopyStatus) MarshalText() ([]byte, error) {
	return []byte(i.String()), nil
}

// UnmarshalText implements the encoding.TextUnmarshaler interface for ImageCacheCopyStatus
func (i *ImageCacheCopyStatus) UnmarshalText(text []byte) error {
	var err error
	*i, err = ImageCacheCopyStatusString(string(text))
	return err
}
