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

// HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode Mode represents the role type for the Performance Replicated cluster.
//
//   - CLUSTER_PERFORMANCE_REPLICATION_INFO_MODE_INVALID: CLUSTER_PERFORMANCE_REPLICATION_INFO_MODE_INVALID is a sentinel zero value so that an uninitialized value can be
//
// detected.
//   - PRIMARY: PRIMARY mode type.
//   - SECONDARY: SECONDARY mode type.
//
// swagger:model hashicorp.cloud.vault_20201125.Cluster.PerformanceReplicationInfo.Mode
type HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode string

func NewHashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode(value HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode) *HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode {
	return &value
}

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

const (

	// HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeCLUSTERPERFORMANCEREPLICATIONINFOMODEINVALID captures enum value "CLUSTER_PERFORMANCE_REPLICATION_INFO_MODE_INVALID"
	HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeCLUSTERPERFORMANCEREPLICATIONINFOMODEINVALID HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode = "CLUSTER_PERFORMANCE_REPLICATION_INFO_MODE_INVALID"

	// HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModePRIMARY captures enum value "PRIMARY"
	HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModePRIMARY HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode = "PRIMARY"

	// HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeSECONDARY captures enum value "SECONDARY"
	HashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeSECONDARY HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode = "SECONDARY"
)

// for schema
var hashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeEnum []interface{}

func init() {
	var res []HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode
	if err := json.Unmarshal([]byte(`["CLUSTER_PERFORMANCE_REPLICATION_INFO_MODE_INVALID","PRIMARY","SECONDARY"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeEnum = append(hashicorpCloudVault20201125ClusterPerformanceReplicationInfoModeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud vault 20201125 cluster performance replication info mode
func (m HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud vault 20201125 cluster performance replication info mode based on context it is used
func (m HashicorpCloudVault20201125ClusterPerformanceReplicationInfoMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
