// 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 (
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// CentralIntegrationPayload central integration payload
//
// swagger:model centralIntegrationPayload
type CentralIntegrationPayload string

const (

	// CentralIntegrationPayloadINTEGRATIONPAYLOADUNSPECIFIED captures enum value "INTEGRATION_PAYLOAD_UNSPECIFIED"
	CentralIntegrationPayloadINTEGRATIONPAYLOADUNSPECIFIED CentralIntegrationPayload = "INTEGRATION_PAYLOAD_UNSPECIFIED"

	// CentralIntegrationPayloadINTEGRATIONPAYLOADMETRICS captures enum value "INTEGRATION_PAYLOAD_METRICS"
	CentralIntegrationPayloadINTEGRATIONPAYLOADMETRICS CentralIntegrationPayload = "INTEGRATION_PAYLOAD_METRICS"

	// CentralIntegrationPayloadINTEGRATIONPAYLOADLOGS captures enum value "INTEGRATION_PAYLOAD_LOGS"
	CentralIntegrationPayloadINTEGRATIONPAYLOADLOGS CentralIntegrationPayload = "INTEGRATION_PAYLOAD_LOGS"

	// CentralIntegrationPayloadINTEGRATIONPAYLOADTRACES captures enum value "INTEGRATION_PAYLOAD_TRACES"
	CentralIntegrationPayloadINTEGRATIONPAYLOADTRACES CentralIntegrationPayload = "INTEGRATION_PAYLOAD_TRACES"
)

// for schema
var centralIntegrationPayloadEnum []interface{}

func init() {
	var res []CentralIntegrationPayload
	if err := json.Unmarshal([]byte(`["INTEGRATION_PAYLOAD_UNSPECIFIED","INTEGRATION_PAYLOAD_METRICS","INTEGRATION_PAYLOAD_LOGS","INTEGRATION_PAYLOAD_TRACES"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		centralIntegrationPayloadEnum = append(centralIntegrationPayloadEnum, v)
	}
}

func (m CentralIntegrationPayload) validateCentralIntegrationPayloadEnum(path, location string, value CentralIntegrationPayload) error {
	if err := validate.Enum(path, location, value, centralIntegrationPayloadEnum); err != nil {
		return err
	}
	return nil
}

// Validate validates this central integration payload
func (m CentralIntegrationPayload) Validate(formats strfmt.Registry) error {
	var res []error

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

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