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

// HashicorpCloudResourcemanagerPolicyBindingMemberType PolicyBindingMemberType is the type of the policy binding member.
//
// swagger:model hashicorp.cloud.resourcemanager.PolicyBindingMemberType
type HashicorpCloudResourcemanagerPolicyBindingMemberType string

func NewHashicorpCloudResourcemanagerPolicyBindingMemberType(value HashicorpCloudResourcemanagerPolicyBindingMemberType) *HashicorpCloudResourcemanagerPolicyBindingMemberType {
	return &value
}

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

const (

	// HashicorpCloudResourcemanagerPolicyBindingMemberTypeUNSET captures enum value "UNSET"
	HashicorpCloudResourcemanagerPolicyBindingMemberTypeUNSET HashicorpCloudResourcemanagerPolicyBindingMemberType = "UNSET"

	// HashicorpCloudResourcemanagerPolicyBindingMemberTypeUSER captures enum value "USER"
	HashicorpCloudResourcemanagerPolicyBindingMemberTypeUSER HashicorpCloudResourcemanagerPolicyBindingMemberType = "USER"

	// HashicorpCloudResourcemanagerPolicyBindingMemberTypeGROUP captures enum value "GROUP"
	HashicorpCloudResourcemanagerPolicyBindingMemberTypeGROUP HashicorpCloudResourcemanagerPolicyBindingMemberType = "GROUP"

	// HashicorpCloudResourcemanagerPolicyBindingMemberTypeSERVICEPRINCIPAL captures enum value "SERVICE_PRINCIPAL"
	HashicorpCloudResourcemanagerPolicyBindingMemberTypeSERVICEPRINCIPAL HashicorpCloudResourcemanagerPolicyBindingMemberType = "SERVICE_PRINCIPAL"
)

// for schema
var hashicorpCloudResourcemanagerPolicyBindingMemberTypeEnum []interface{}

func init() {
	var res []HashicorpCloudResourcemanagerPolicyBindingMemberType
	if err := json.Unmarshal([]byte(`["UNSET","USER","GROUP","SERVICE_PRINCIPAL"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudResourcemanagerPolicyBindingMemberTypeEnum = append(hashicorpCloudResourcemanagerPolicyBindingMemberTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud resourcemanager policy binding member type
func (m HashicorpCloudResourcemanagerPolicyBindingMemberType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud resourcemanager policy binding member type based on context it is used
func (m HashicorpCloudResourcemanagerPolicyBindingMemberType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
