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

// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError service topology errors are returned with the graph on failures to gather metadata for some part(s) of the graph.
//
//   - ERROR_NODE_SERVICE: node service error is returned if we failed to get service metadata from GNM for some/all of the services.
//   - ERROR_NODE_CLUSTER: node cluster error is returned if we failed to get cluster-level metadata from GNM for some/all of the services' clusters.
//   - ERROR_NODE_METRICS: node metric error is returned if we failed to get service metrics for connections/requests into services from all other services.
//   - ERROR_EDGE_METRICS: edge metric error is returned if we failed to get connection/request metrics between services.
//   - ERROR_EDGE_INTENTIONS: edge intentions error is returned if we failed to get intentions from GNM.
//
// swagger:model hashicorp.cloud.consul_telemetry_20230414.GetServiceTopologyStatus.Error
type HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError string

func NewHashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError(value HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError) *HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError {
	return &value
}

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

const (

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORUNSPECIFIED captures enum value "ERROR_UNSPECIFIED"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORUNSPECIFIED HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_UNSPECIFIED"

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODESERVICE captures enum value "ERROR_NODE_SERVICE"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODESERVICE HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_NODE_SERVICE"

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODECLUSTER captures enum value "ERROR_NODE_CLUSTER"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODECLUSTER HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_NODE_CLUSTER"

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODEMETRICS captures enum value "ERROR_NODE_METRICS"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERRORNODEMETRICS HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_NODE_METRICS"

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERROREDGEMETRICS captures enum value "ERROR_EDGE_METRICS"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERROREDGEMETRICS HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_EDGE_METRICS"

	// HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERROREDGEINTENTIONS captures enum value "ERROR_EDGE_INTENTIONS"
	HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorERROREDGEINTENTIONS HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError = "ERROR_EDGE_INTENTIONS"
)

// for schema
var hashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorEnum []interface{}

func init() {
	var res []HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError
	if err := json.Unmarshal([]byte(`["ERROR_UNSPECIFIED","ERROR_NODE_SERVICE","ERROR_NODE_CLUSTER","ERROR_NODE_METRICS","ERROR_EDGE_METRICS","ERROR_EDGE_INTENTIONS"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorEnum = append(hashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusErrorEnum, v)
	}
}

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

// Validate validates this hashicorp cloud consul telemetry 20230414 get service topology status error
func (m HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud consul telemetry 20230414 get service topology status error based on context it is used
func (m HashicorpCloudConsulTelemetry20230414GetServiceTopologyStatusError) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
