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

// V1alpha1AppStatus - APP_STATUS_UNSPECIFIED: Unspecified status
//   - APP_STATUS_ACTIVE: The App has at least one active badge
//   - APP_STATUS_PENDING: The App has no badges
//   - APP_STATUS_REVOKED: The App has all the badges revoked
//
// swagger:model v1alpha1AppStatus
type V1alpha1AppStatus string

func NewV1alpha1AppStatus(value V1alpha1AppStatus) *V1alpha1AppStatus {
	return &value
}

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

const (

	// V1alpha1AppStatusAPPSTATUSUNSPECIFIED captures enum value "APP_STATUS_UNSPECIFIED"
	V1alpha1AppStatusAPPSTATUSUNSPECIFIED V1alpha1AppStatus = "APP_STATUS_UNSPECIFIED"

	// V1alpha1AppStatusAPPSTATUSACTIVE captures enum value "APP_STATUS_ACTIVE"
	V1alpha1AppStatusAPPSTATUSACTIVE V1alpha1AppStatus = "APP_STATUS_ACTIVE"

	// V1alpha1AppStatusAPPSTATUSPENDING captures enum value "APP_STATUS_PENDING"
	V1alpha1AppStatusAPPSTATUSPENDING V1alpha1AppStatus = "APP_STATUS_PENDING"

	// V1alpha1AppStatusAPPSTATUSREVOKED captures enum value "APP_STATUS_REVOKED"
	V1alpha1AppStatusAPPSTATUSREVOKED V1alpha1AppStatus = "APP_STATUS_REVOKED"
)

// for schema
var v1alpha1AppStatusEnum []any

func init() {
	var res []V1alpha1AppStatus
	if err := json.Unmarshal([]byte(`["APP_STATUS_UNSPECIFIED","APP_STATUS_ACTIVE","APP_STATUS_PENDING","APP_STATUS_REVOKED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		v1alpha1AppStatusEnum = append(v1alpha1AppStatusEnum, v)
	}
}

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

// Validate validates this v1alpha1 app status
func (m V1alpha1AppStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this v1alpha1 app status based on context it is used
func (m V1alpha1AppStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
