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

// HashicorpCloudIamGroupMemberPrincipalType hashicorp cloud iam group member principal type
//
// swagger:model hashicorp.cloud.iam.GroupMemberPrincipalType
type HashicorpCloudIamGroupMemberPrincipalType string

func NewHashicorpCloudIamGroupMemberPrincipalType(value HashicorpCloudIamGroupMemberPrincipalType) *HashicorpCloudIamGroupMemberPrincipalType {
	return &value
}

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

const (

	// HashicorpCloudIamGroupMemberPrincipalTypeGROUPMEMBERPRINCIPALTYPEUNSPECIFIED captures enum value "GROUP_MEMBER_PRINCIPAL_TYPE_UNSPECIFIED"
	HashicorpCloudIamGroupMemberPrincipalTypeGROUPMEMBERPRINCIPALTYPEUNSPECIFIED HashicorpCloudIamGroupMemberPrincipalType = "GROUP_MEMBER_PRINCIPAL_TYPE_UNSPECIFIED"

	// HashicorpCloudIamGroupMemberPrincipalTypeGROUPMEMBERPRINCIPALTYPEUSER captures enum value "GROUP_MEMBER_PRINCIPAL_TYPE_USER"
	HashicorpCloudIamGroupMemberPrincipalTypeGROUPMEMBERPRINCIPALTYPEUSER HashicorpCloudIamGroupMemberPrincipalType = "GROUP_MEMBER_PRINCIPAL_TYPE_USER"
)

// for schema
var hashicorpCloudIamGroupMemberPrincipalTypeEnum []interface{}

func init() {
	var res []HashicorpCloudIamGroupMemberPrincipalType
	if err := json.Unmarshal([]byte(`["GROUP_MEMBER_PRINCIPAL_TYPE_UNSPECIFIED","GROUP_MEMBER_PRINCIPAL_TYPE_USER"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudIamGroupMemberPrincipalTypeEnum = append(hashicorpCloudIamGroupMemberPrincipalTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud iam group member principal type
func (m HashicorpCloudIamGroupMemberPrincipalType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud iam group member principal type based on context it is used
func (m HashicorpCloudIamGroupMemberPrincipalType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
