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

package ops

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

// JumpAuthorizationPhase jump authorization phase
//
// swagger:model jump.AuthorizationPhase
type JumpAuthorizationPhase string

func NewJumpAuthorizationPhase(value JumpAuthorizationPhase) *JumpAuthorizationPhase {
	return &value
}

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

const (

	// JumpAuthorizationPhaseInitialized captures enum value "initialized"
	JumpAuthorizationPhaseInitialized JumpAuthorizationPhase = "initialized"

	// JumpAuthorizationPhaseApproving captures enum value "approving"
	JumpAuthorizationPhaseApproving JumpAuthorizationPhase = "approving"

	// JumpAuthorizationPhaseCreating captures enum value "creating"
	JumpAuthorizationPhaseCreating JumpAuthorizationPhase = "creating"

	// JumpAuthorizationPhaseCreated captures enum value "created"
	JumpAuthorizationPhaseCreated JumpAuthorizationPhase = "created"

	// JumpAuthorizationPhaseExpired captures enum value "expired"
	JumpAuthorizationPhaseExpired JumpAuthorizationPhase = "expired"

	// JumpAuthorizationPhaseNotapproved captures enum value "notapproved"
	JumpAuthorizationPhaseNotapproved JumpAuthorizationPhase = "notapproved"

	// JumpAuthorizationPhaseCreationfailed captures enum value "creationfailed"
	JumpAuthorizationPhaseCreationfailed JumpAuthorizationPhase = "creationfailed"

	// JumpAuthorizationPhaseCanceled captures enum value "canceled"
	JumpAuthorizationPhaseCanceled JumpAuthorizationPhase = "canceled"
)

// for schema
var jumpAuthorizationPhaseEnum []interface{}

func init() {
	var res []JumpAuthorizationPhase
	if err := json.Unmarshal([]byte(`["initialized","approving","creating","created","expired","notapproved","creationfailed","canceled"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		jumpAuthorizationPhaseEnum = append(jumpAuthorizationPhaseEnum, v)
	}
}

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

// Validate validates this jump authorization phase
func (m JumpAuthorizationPhase) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this jump authorization phase based on context it is used
func (m JumpAuthorizationPhase) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
