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

// APIIntegrationKind api integration kind
//
// swagger:model apiIntegrationKind
type APIIntegrationKind string

func NewAPIIntegrationKind(value APIIntegrationKind) *APIIntegrationKind {
	return &value
}

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

const (

	// APIIntegrationKindHTTP captures enum value "HTTP"
	APIIntegrationKindHTTP APIIntegrationKind = "HTTP"

	// APIIntegrationKindINFLUXDB captures enum value "INFLUX_DB"
	APIIntegrationKindINFLUXDB APIIntegrationKind = "INFLUX_DB"

	// APIIntegrationKindTHINGSBOARD captures enum value "THINGS_BOARD"
	APIIntegrationKindTHINGSBOARD APIIntegrationKind = "THINGS_BOARD"

	// APIIntegrationKindMYDEVICES captures enum value "MY_DEVICES"
	APIIntegrationKindMYDEVICES APIIntegrationKind = "MY_DEVICES"

	// APIIntegrationKindGCPPUBSUB captures enum value "GCP_PUB_SUB"
	APIIntegrationKindGCPPUBSUB APIIntegrationKind = "GCP_PUB_SUB"

	// APIIntegrationKindAWSSNS captures enum value "AWS_SNS"
	APIIntegrationKindAWSSNS APIIntegrationKind = "AWS_SNS"

	// APIIntegrationKindAZURESERVICEBUS captures enum value "AZURE_SERVICE_BUS"
	APIIntegrationKindAZURESERVICEBUS APIIntegrationKind = "AZURE_SERVICE_BUS"

	// APIIntegrationKindPILOTTHINGS captures enum value "PILOT_THINGS"
	APIIntegrationKindPILOTTHINGS APIIntegrationKind = "PILOT_THINGS"

	// APIIntegrationKindMQTTGLOBAL captures enum value "MQTT_GLOBAL"
	APIIntegrationKindMQTTGLOBAL APIIntegrationKind = "MQTT_GLOBAL"

	// APIIntegrationKindIFTTT captures enum value "IFTTT"
	APIIntegrationKindIFTTT APIIntegrationKind = "IFTTT"
)

// for schema
var apiIntegrationKindEnum []interface{}

func init() {
	var res []APIIntegrationKind
	if err := json.Unmarshal([]byte(`["HTTP","INFLUX_DB","THINGS_BOARD","MY_DEVICES","GCP_PUB_SUB","AWS_SNS","AZURE_SERVICE_BUS","PILOT_THINGS","MQTT_GLOBAL","IFTTT"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiIntegrationKindEnum = append(apiIntegrationKindEnum, v)
	}
}

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

// Validate validates this api integration kind
func (m APIIntegrationKind) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this api integration kind based on context it is used
func (m APIIntegrationKind) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
