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

// HashicorpCloudIamPrincipalView PrincipalView allows retrieving a partial view of a Principal.
//
//   - PRINCIPAL_VIEW_UNSPECIFIED: The default / unset value.
//   - PRINCIPAL_VIEW_BASIC: Include basic metadata about the principal, but not the principal details.
//
// This will return the Id and Type only.
//   - PRINCIPAL_VIEW_FULL: Include everything.
//
// swagger:model hashicorp.cloud.iam.PrincipalView
type HashicorpCloudIamPrincipalView string

func NewHashicorpCloudIamPrincipalView(value HashicorpCloudIamPrincipalView) *HashicorpCloudIamPrincipalView {
	return &value
}

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

const (

	// HashicorpCloudIamPrincipalViewPRINCIPALVIEWUNSPECIFIED captures enum value "PRINCIPAL_VIEW_UNSPECIFIED"
	HashicorpCloudIamPrincipalViewPRINCIPALVIEWUNSPECIFIED HashicorpCloudIamPrincipalView = "PRINCIPAL_VIEW_UNSPECIFIED"

	// HashicorpCloudIamPrincipalViewPRINCIPALVIEWBASIC captures enum value "PRINCIPAL_VIEW_BASIC"
	HashicorpCloudIamPrincipalViewPRINCIPALVIEWBASIC HashicorpCloudIamPrincipalView = "PRINCIPAL_VIEW_BASIC"

	// HashicorpCloudIamPrincipalViewPRINCIPALVIEWFULL captures enum value "PRINCIPAL_VIEW_FULL"
	HashicorpCloudIamPrincipalViewPRINCIPALVIEWFULL HashicorpCloudIamPrincipalView = "PRINCIPAL_VIEW_FULL"
)

// for schema
var hashicorpCloudIamPrincipalViewEnum []interface{}

func init() {
	var res []HashicorpCloudIamPrincipalView
	if err := json.Unmarshal([]byte(`["PRINCIPAL_VIEW_UNSPECIFIED","PRINCIPAL_VIEW_BASIC","PRINCIPAL_VIEW_FULL"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudIamPrincipalViewEnum = append(hashicorpCloudIamPrincipalViewEnum, v)
	}
}

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

// Validate validates this hashicorp cloud iam principal view
func (m HashicorpCloudIamPrincipalView) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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