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

// JumpJumpPrivilege jump jump privilege
//
// swagger:model jump.JumpPrivilege
type JumpJumpPrivilege string

func NewJumpJumpPrivilege(value JumpJumpPrivilege) *JumpJumpPrivilege {
	return &value
}

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

const (

	// JumpJumpPrivilegeReadOnly captures enum value "read_only"
	JumpJumpPrivilegeReadOnly JumpJumpPrivilege = "read_only"

	// JumpJumpPrivilegeReadWrite captures enum value "read_write"
	JumpJumpPrivilegeReadWrite JumpJumpPrivilege = "read_write"

	// JumpJumpPrivilegeAdmin captures enum value "admin"
	JumpJumpPrivilegeAdmin JumpJumpPrivilege = "admin"
)

// for schema
var jumpJumpPrivilegeEnum []interface{}

func init() {
	var res []JumpJumpPrivilege
	if err := json.Unmarshal([]byte(`["read_only","read_write","admin"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		jumpJumpPrivilegeEnum = append(jumpJumpPrivilegeEnum, v)
	}
}

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

// Validate validates this jump jump privilege
func (m JumpJumpPrivilege) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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