// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package shared

import (
	"encoding/json"
	"errors"
	"fmt"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
)

type DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode string

const (
	DestinationQdrantUpdateSchemasEmbeddingEmbedding5ModeOpenaiCompatible DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode = "openai_compatible"
)

func (e DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode) ToPointer() *DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "openai_compatible":
		*e = DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode: %v", v)
	}
}

// DestinationQdrantUpdateOpenAICompatible - Use a service that's compatible with the OpenAI API to embed text.
type DestinationQdrantUpdateOpenAICompatible struct {
	APIKey *string `default:"" json:"api_key"`
	// The base URL for your OpenAI-compatible service
	BaseURL string `json:"base_url"`
	// The number of dimensions the embedding model is generating
	Dimensions int64                                                  `json:"dimensions"`
	mode       *DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode `const:"openai_compatible" json:"mode"`
	// The name of the model to use for embedding
	ModelName *string `default:"text-embedding-ada-002" json:"model_name"`
}

func (d DestinationQdrantUpdateOpenAICompatible) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateOpenAICompatible) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateOpenAICompatible) GetAPIKey() *string {
	if o == nil {
		return nil
	}
	return o.APIKey
}

func (o *DestinationQdrantUpdateOpenAICompatible) GetBaseURL() string {
	if o == nil {
		return ""
	}
	return o.BaseURL
}

func (o *DestinationQdrantUpdateOpenAICompatible) GetDimensions() int64 {
	if o == nil {
		return 0
	}
	return o.Dimensions
}

func (o *DestinationQdrantUpdateOpenAICompatible) GetMode() *DestinationQdrantUpdateSchemasEmbeddingEmbedding5Mode {
	return DestinationQdrantUpdateSchemasEmbeddingEmbedding5ModeOpenaiCompatible.ToPointer()
}

func (o *DestinationQdrantUpdateOpenAICompatible) GetModelName() *string {
	if o == nil {
		return nil
	}
	return o.ModelName
}

type DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode string

const (
	DestinationQdrantUpdateSchemasEmbeddingEmbeddingModeAzureOpenai DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode = "azure_openai"
)

func (e DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode) ToPointer() *DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "azure_openai":
		*e = DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode: %v", v)
	}
}

// DestinationQdrantUpdateAzureOpenAI - Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.
type DestinationQdrantUpdateAzureOpenAI struct {
	// The base URL for your Azure OpenAI resource.  You can find this in the Azure portal under your Azure OpenAI resource
	APIBase string `json:"api_base"`
	// The deployment for your Azure OpenAI resource.  You can find this in the Azure portal under your Azure OpenAI resource
	Deployment string                                                `json:"deployment"`
	mode       *DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode `const:"azure_openai" json:"mode"`
	// The API key for your Azure OpenAI resource.  You can find this in the Azure portal under your Azure OpenAI resource
	OpenaiKey string `json:"openai_key"`
}

func (d DestinationQdrantUpdateAzureOpenAI) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateAzureOpenAI) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateAzureOpenAI) GetAPIBase() string {
	if o == nil {
		return ""
	}
	return o.APIBase
}

func (o *DestinationQdrantUpdateAzureOpenAI) GetDeployment() string {
	if o == nil {
		return ""
	}
	return o.Deployment
}

func (o *DestinationQdrantUpdateAzureOpenAI) GetMode() *DestinationQdrantUpdateSchemasEmbeddingEmbeddingMode {
	return DestinationQdrantUpdateSchemasEmbeddingEmbeddingModeAzureOpenai.ToPointer()
}

func (o *DestinationQdrantUpdateAzureOpenAI) GetOpenaiKey() string {
	if o == nil {
		return ""
	}
	return o.OpenaiKey
}

type DestinationQdrantUpdateSchemasEmbeddingMode string

const (
	DestinationQdrantUpdateSchemasEmbeddingModeFake DestinationQdrantUpdateSchemasEmbeddingMode = "fake"
)

func (e DestinationQdrantUpdateSchemasEmbeddingMode) ToPointer() *DestinationQdrantUpdateSchemasEmbeddingMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasEmbeddingMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "fake":
		*e = DestinationQdrantUpdateSchemasEmbeddingMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasEmbeddingMode: %v", v)
	}
}

// DestinationQdrantUpdateFake - Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.
type DestinationQdrantUpdateFake struct {
	mode *DestinationQdrantUpdateSchemasEmbeddingMode `const:"fake" json:"mode"`
}

func (d DestinationQdrantUpdateFake) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateFake) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateFake) GetMode() *DestinationQdrantUpdateSchemasEmbeddingMode {
	return DestinationQdrantUpdateSchemasEmbeddingModeFake.ToPointer()
}

type DestinationQdrantUpdateSchemasMode string

const (
	DestinationQdrantUpdateSchemasModeCohere DestinationQdrantUpdateSchemasMode = "cohere"
)

func (e DestinationQdrantUpdateSchemasMode) ToPointer() *DestinationQdrantUpdateSchemasMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "cohere":
		*e = DestinationQdrantUpdateSchemasMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasMode: %v", v)
	}
}

// DestinationQdrantUpdateCohere - Use the Cohere API to embed text.
type DestinationQdrantUpdateCohere struct {
	CohereKey string                              `json:"cohere_key"`
	mode      *DestinationQdrantUpdateSchemasMode `const:"cohere" json:"mode"`
}

func (d DestinationQdrantUpdateCohere) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateCohere) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateCohere) GetCohereKey() string {
	if o == nil {
		return ""
	}
	return o.CohereKey
}

func (o *DestinationQdrantUpdateCohere) GetMode() *DestinationQdrantUpdateSchemasMode {
	return DestinationQdrantUpdateSchemasModeCohere.ToPointer()
}

type DestinationQdrantUpdateMode string

const (
	DestinationQdrantUpdateModeOpenai DestinationQdrantUpdateMode = "openai"
)

func (e DestinationQdrantUpdateMode) ToPointer() *DestinationQdrantUpdateMode {
	return &e
}
func (e *DestinationQdrantUpdateMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "openai":
		*e = DestinationQdrantUpdateMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateMode: %v", v)
	}
}

// DestinationQdrantUpdateOpenAI - Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.
type DestinationQdrantUpdateOpenAI struct {
	mode      *DestinationQdrantUpdateMode `const:"openai" json:"mode"`
	OpenaiKey string                       `json:"openai_key"`
}

func (d DestinationQdrantUpdateOpenAI) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateOpenAI) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateOpenAI) GetMode() *DestinationQdrantUpdateMode {
	return DestinationQdrantUpdateModeOpenai.ToPointer()
}

func (o *DestinationQdrantUpdateOpenAI) GetOpenaiKey() string {
	if o == nil {
		return ""
	}
	return o.OpenaiKey
}

type DestinationQdrantUpdateEmbeddingType string

const (
	DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAI           DestinationQdrantUpdateEmbeddingType = "destination-qdrant-update_OpenAI"
	DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateCohere           DestinationQdrantUpdateEmbeddingType = "destination-qdrant-update_Cohere"
	DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateFake             DestinationQdrantUpdateEmbeddingType = "destination-qdrant-update_Fake"
	DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateAzureOpenAI      DestinationQdrantUpdateEmbeddingType = "destination-qdrant-update_Azure OpenAI"
	DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAICompatible DestinationQdrantUpdateEmbeddingType = "destination-qdrant-update_OpenAI-compatible"
)

// DestinationQdrantUpdateEmbedding - Embedding configuration
type DestinationQdrantUpdateEmbedding struct {
	DestinationQdrantUpdateOpenAI           *DestinationQdrantUpdateOpenAI           `queryParam:"inline"`
	DestinationQdrantUpdateCohere           *DestinationQdrantUpdateCohere           `queryParam:"inline"`
	DestinationQdrantUpdateFake             *DestinationQdrantUpdateFake             `queryParam:"inline"`
	DestinationQdrantUpdateAzureOpenAI      *DestinationQdrantUpdateAzureOpenAI      `queryParam:"inline"`
	DestinationQdrantUpdateOpenAICompatible *DestinationQdrantUpdateOpenAICompatible `queryParam:"inline"`

	Type DestinationQdrantUpdateEmbeddingType
}

func CreateDestinationQdrantUpdateEmbeddingDestinationQdrantUpdateOpenAI(destinationQdrantUpdateOpenAI DestinationQdrantUpdateOpenAI) DestinationQdrantUpdateEmbedding {
	typ := DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAI

	return DestinationQdrantUpdateEmbedding{
		DestinationQdrantUpdateOpenAI: &destinationQdrantUpdateOpenAI,
		Type:                          typ,
	}
}

func CreateDestinationQdrantUpdateEmbeddingDestinationQdrantUpdateCohere(destinationQdrantUpdateCohere DestinationQdrantUpdateCohere) DestinationQdrantUpdateEmbedding {
	typ := DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateCohere

	return DestinationQdrantUpdateEmbedding{
		DestinationQdrantUpdateCohere: &destinationQdrantUpdateCohere,
		Type:                          typ,
	}
}

func CreateDestinationQdrantUpdateEmbeddingDestinationQdrantUpdateFake(destinationQdrantUpdateFake DestinationQdrantUpdateFake) DestinationQdrantUpdateEmbedding {
	typ := DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateFake

	return DestinationQdrantUpdateEmbedding{
		DestinationQdrantUpdateFake: &destinationQdrantUpdateFake,
		Type:                        typ,
	}
}

func CreateDestinationQdrantUpdateEmbeddingDestinationQdrantUpdateAzureOpenAI(destinationQdrantUpdateAzureOpenAI DestinationQdrantUpdateAzureOpenAI) DestinationQdrantUpdateEmbedding {
	typ := DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateAzureOpenAI

	return DestinationQdrantUpdateEmbedding{
		DestinationQdrantUpdateAzureOpenAI: &destinationQdrantUpdateAzureOpenAI,
		Type:                               typ,
	}
}

func CreateDestinationQdrantUpdateEmbeddingDestinationQdrantUpdateOpenAICompatible(destinationQdrantUpdateOpenAICompatible DestinationQdrantUpdateOpenAICompatible) DestinationQdrantUpdateEmbedding {
	typ := DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAICompatible

	return DestinationQdrantUpdateEmbedding{
		DestinationQdrantUpdateOpenAICompatible: &destinationQdrantUpdateOpenAICompatible,
		Type:                                    typ,
	}
}

func (u *DestinationQdrantUpdateEmbedding) UnmarshalJSON(data []byte) error {

	var destinationQdrantUpdateFake DestinationQdrantUpdateFake = DestinationQdrantUpdateFake{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateFake, "", true, true); err == nil {
		u.DestinationQdrantUpdateFake = &destinationQdrantUpdateFake
		u.Type = DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateFake
		return nil
	}

	var destinationQdrantUpdateOpenAI DestinationQdrantUpdateOpenAI = DestinationQdrantUpdateOpenAI{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateOpenAI, "", true, true); err == nil {
		u.DestinationQdrantUpdateOpenAI = &destinationQdrantUpdateOpenAI
		u.Type = DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAI
		return nil
	}

	var destinationQdrantUpdateCohere DestinationQdrantUpdateCohere = DestinationQdrantUpdateCohere{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateCohere, "", true, true); err == nil {
		u.DestinationQdrantUpdateCohere = &destinationQdrantUpdateCohere
		u.Type = DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateCohere
		return nil
	}

	var destinationQdrantUpdateAzureOpenAI DestinationQdrantUpdateAzureOpenAI = DestinationQdrantUpdateAzureOpenAI{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateAzureOpenAI, "", true, true); err == nil {
		u.DestinationQdrantUpdateAzureOpenAI = &destinationQdrantUpdateAzureOpenAI
		u.Type = DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateAzureOpenAI
		return nil
	}

	var destinationQdrantUpdateOpenAICompatible DestinationQdrantUpdateOpenAICompatible = DestinationQdrantUpdateOpenAICompatible{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateOpenAICompatible, "", true, true); err == nil {
		u.DestinationQdrantUpdateOpenAICompatible = &destinationQdrantUpdateOpenAICompatible
		u.Type = DestinationQdrantUpdateEmbeddingTypeDestinationQdrantUpdateOpenAICompatible
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationQdrantUpdateEmbedding", string(data))
}

func (u DestinationQdrantUpdateEmbedding) MarshalJSON() ([]byte, error) {
	if u.DestinationQdrantUpdateOpenAI != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateOpenAI, "", true)
	}

	if u.DestinationQdrantUpdateCohere != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateCohere, "", true)
	}

	if u.DestinationQdrantUpdateFake != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateFake, "", true)
	}

	if u.DestinationQdrantUpdateAzureOpenAI != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateAzureOpenAI, "", true)
	}

	if u.DestinationQdrantUpdateOpenAICompatible != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateOpenAICompatible, "", true)
	}

	return nil, errors.New("could not marshal union type DestinationQdrantUpdateEmbedding: all fields are null")
}

type DestinationQdrantUpdateSchemasIndexingAuthMethodMode string

const (
	DestinationQdrantUpdateSchemasIndexingAuthMethodModeNoAuth DestinationQdrantUpdateSchemasIndexingAuthMethodMode = "no_auth"
)

func (e DestinationQdrantUpdateSchemasIndexingAuthMethodMode) ToPointer() *DestinationQdrantUpdateSchemasIndexingAuthMethodMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasIndexingAuthMethodMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "no_auth":
		*e = DestinationQdrantUpdateSchemasIndexingAuthMethodMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasIndexingAuthMethodMode: %v", v)
	}
}

type DestinationQdrantUpdateNoAuth struct {
	mode *DestinationQdrantUpdateSchemasIndexingAuthMethodMode `const:"no_auth" json:"mode"`
}

func (d DestinationQdrantUpdateNoAuth) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateNoAuth) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateNoAuth) GetMode() *DestinationQdrantUpdateSchemasIndexingAuthMethodMode {
	return DestinationQdrantUpdateSchemasIndexingAuthMethodModeNoAuth.ToPointer()
}

type DestinationQdrantUpdateSchemasIndexingMode string

const (
	DestinationQdrantUpdateSchemasIndexingModeAPIKeyAuth DestinationQdrantUpdateSchemasIndexingMode = "api_key_auth"
)

func (e DestinationQdrantUpdateSchemasIndexingMode) ToPointer() *DestinationQdrantUpdateSchemasIndexingMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasIndexingMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "api_key_auth":
		*e = DestinationQdrantUpdateSchemasIndexingMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasIndexingMode: %v", v)
	}
}

type DestinationQdrantUpdateAPIKeyAuth struct {
	// API Key for the Qdrant instance
	APIKey string                                      `json:"api_key"`
	mode   *DestinationQdrantUpdateSchemasIndexingMode `const:"api_key_auth" json:"mode"`
}

func (d DestinationQdrantUpdateAPIKeyAuth) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateAPIKeyAuth) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateAPIKeyAuth) GetAPIKey() string {
	if o == nil {
		return ""
	}
	return o.APIKey
}

func (o *DestinationQdrantUpdateAPIKeyAuth) GetMode() *DestinationQdrantUpdateSchemasIndexingMode {
	return DestinationQdrantUpdateSchemasIndexingModeAPIKeyAuth.ToPointer()
}

type DestinationQdrantUpdateAuthenticationMethodType string

const (
	DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateAPIKeyAuth DestinationQdrantUpdateAuthenticationMethodType = "destination-qdrant-update_ApiKeyAuth"
	DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateNoAuth     DestinationQdrantUpdateAuthenticationMethodType = "destination-qdrant-update_NoAuth"
)

// DestinationQdrantUpdateAuthenticationMethod - Method to authenticate with the Qdrant Instance
type DestinationQdrantUpdateAuthenticationMethod struct {
	DestinationQdrantUpdateAPIKeyAuth *DestinationQdrantUpdateAPIKeyAuth `queryParam:"inline"`
	DestinationQdrantUpdateNoAuth     *DestinationQdrantUpdateNoAuth     `queryParam:"inline"`

	Type DestinationQdrantUpdateAuthenticationMethodType
}

func CreateDestinationQdrantUpdateAuthenticationMethodDestinationQdrantUpdateAPIKeyAuth(destinationQdrantUpdateAPIKeyAuth DestinationQdrantUpdateAPIKeyAuth) DestinationQdrantUpdateAuthenticationMethod {
	typ := DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateAPIKeyAuth

	return DestinationQdrantUpdateAuthenticationMethod{
		DestinationQdrantUpdateAPIKeyAuth: &destinationQdrantUpdateAPIKeyAuth,
		Type:                              typ,
	}
}

func CreateDestinationQdrantUpdateAuthenticationMethodDestinationQdrantUpdateNoAuth(destinationQdrantUpdateNoAuth DestinationQdrantUpdateNoAuth) DestinationQdrantUpdateAuthenticationMethod {
	typ := DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateNoAuth

	return DestinationQdrantUpdateAuthenticationMethod{
		DestinationQdrantUpdateNoAuth: &destinationQdrantUpdateNoAuth,
		Type:                          typ,
	}
}

func (u *DestinationQdrantUpdateAuthenticationMethod) UnmarshalJSON(data []byte) error {

	var destinationQdrantUpdateNoAuth DestinationQdrantUpdateNoAuth = DestinationQdrantUpdateNoAuth{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateNoAuth, "", true, true); err == nil {
		u.DestinationQdrantUpdateNoAuth = &destinationQdrantUpdateNoAuth
		u.Type = DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateNoAuth
		return nil
	}

	var destinationQdrantUpdateAPIKeyAuth DestinationQdrantUpdateAPIKeyAuth = DestinationQdrantUpdateAPIKeyAuth{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateAPIKeyAuth, "", true, true); err == nil {
		u.DestinationQdrantUpdateAPIKeyAuth = &destinationQdrantUpdateAPIKeyAuth
		u.Type = DestinationQdrantUpdateAuthenticationMethodTypeDestinationQdrantUpdateAPIKeyAuth
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationQdrantUpdateAuthenticationMethod", string(data))
}

func (u DestinationQdrantUpdateAuthenticationMethod) MarshalJSON() ([]byte, error) {
	if u.DestinationQdrantUpdateAPIKeyAuth != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateAPIKeyAuth, "", true)
	}

	if u.DestinationQdrantUpdateNoAuth != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateNoAuth, "", true)
	}

	return nil, errors.New("could not marshal union type DestinationQdrantUpdateAuthenticationMethod: all fields are null")
}

// DestinationQdrantUpdateDistanceMetric - The Distance metric used to measure similarities among vectors. This field is only used if the collection defined in the does not exist yet and is created automatically by the connector.
type DestinationQdrantUpdateDistanceMetric string

const (
	DestinationQdrantUpdateDistanceMetricDot DestinationQdrantUpdateDistanceMetric = "dot"
	DestinationQdrantUpdateDistanceMetricCos DestinationQdrantUpdateDistanceMetric = "cos"
	DestinationQdrantUpdateDistanceMetricEuc DestinationQdrantUpdateDistanceMetric = "euc"
)

func (e DestinationQdrantUpdateDistanceMetric) ToPointer() *DestinationQdrantUpdateDistanceMetric {
	return &e
}
func (e *DestinationQdrantUpdateDistanceMetric) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "dot":
		fallthrough
	case "cos":
		fallthrough
	case "euc":
		*e = DestinationQdrantUpdateDistanceMetric(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateDistanceMetric: %v", v)
	}
}

// DestinationQdrantUpdateIndexing - Indexing configuration
type DestinationQdrantUpdateIndexing struct {
	// Method to authenticate with the Qdrant Instance
	AuthMethod *DestinationQdrantUpdateAuthenticationMethod `json:"auth_method,omitempty"`
	// The collection to load data into
	Collection string `json:"collection"`
	// The Distance metric used to measure similarities among vectors. This field is only used if the collection defined in the does not exist yet and is created automatically by the connector.
	DistanceMetric *DestinationQdrantUpdateDistanceMetric `default:"cos" json:"distance_metric"`
	// Whether to prefer gRPC over HTTP. Set to true for Qdrant cloud clusters
	PreferGrpc *bool `default:"true" json:"prefer_grpc"`
	// The field in the payload that contains the embedded text
	TextField *string `default:"text" json:"text_field"`
	// Public Endpoint of the Qdrant cluser
	URL string `json:"url"`
}

func (d DestinationQdrantUpdateIndexing) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateIndexing) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateIndexing) GetAuthMethod() *DestinationQdrantUpdateAuthenticationMethod {
	if o == nil {
		return nil
	}
	return o.AuthMethod
}

func (o *DestinationQdrantUpdateIndexing) GetCollection() string {
	if o == nil {
		return ""
	}
	return o.Collection
}

func (o *DestinationQdrantUpdateIndexing) GetDistanceMetric() *DestinationQdrantUpdateDistanceMetric {
	if o == nil {
		return nil
	}
	return o.DistanceMetric
}

func (o *DestinationQdrantUpdateIndexing) GetPreferGrpc() *bool {
	if o == nil {
		return nil
	}
	return o.PreferGrpc
}

func (o *DestinationQdrantUpdateIndexing) GetTextField() *string {
	if o == nil {
		return nil
	}
	return o.TextField
}

func (o *DestinationQdrantUpdateIndexing) GetURL() string {
	if o == nil {
		return ""
	}
	return o.URL
}

type DestinationQdrantUpdateFieldNameMappingConfigModel struct {
	// The field name in the source
	FromField string `json:"from_field"`
	// The field name to use in the destination
	ToField string `json:"to_field"`
}

func (o *DestinationQdrantUpdateFieldNameMappingConfigModel) GetFromField() string {
	if o == nil {
		return ""
	}
	return o.FromField
}

func (o *DestinationQdrantUpdateFieldNameMappingConfigModel) GetToField() string {
	if o == nil {
		return ""
	}
	return o.ToField
}

// DestinationQdrantUpdateLanguage - Split code in suitable places based on the programming language
type DestinationQdrantUpdateLanguage string

const (
	DestinationQdrantUpdateLanguageCpp      DestinationQdrantUpdateLanguage = "cpp"
	DestinationQdrantUpdateLanguageGo       DestinationQdrantUpdateLanguage = "go"
	DestinationQdrantUpdateLanguageJava     DestinationQdrantUpdateLanguage = "java"
	DestinationQdrantUpdateLanguageJs       DestinationQdrantUpdateLanguage = "js"
	DestinationQdrantUpdateLanguagePhp      DestinationQdrantUpdateLanguage = "php"
	DestinationQdrantUpdateLanguageProto    DestinationQdrantUpdateLanguage = "proto"
	DestinationQdrantUpdateLanguagePython   DestinationQdrantUpdateLanguage = "python"
	DestinationQdrantUpdateLanguageRst      DestinationQdrantUpdateLanguage = "rst"
	DestinationQdrantUpdateLanguageRuby     DestinationQdrantUpdateLanguage = "ruby"
	DestinationQdrantUpdateLanguageRust     DestinationQdrantUpdateLanguage = "rust"
	DestinationQdrantUpdateLanguageScala    DestinationQdrantUpdateLanguage = "scala"
	DestinationQdrantUpdateLanguageSwift    DestinationQdrantUpdateLanguage = "swift"
	DestinationQdrantUpdateLanguageMarkdown DestinationQdrantUpdateLanguage = "markdown"
	DestinationQdrantUpdateLanguageLatex    DestinationQdrantUpdateLanguage = "latex"
	DestinationQdrantUpdateLanguageHTML     DestinationQdrantUpdateLanguage = "html"
	DestinationQdrantUpdateLanguageSol      DestinationQdrantUpdateLanguage = "sol"
)

func (e DestinationQdrantUpdateLanguage) ToPointer() *DestinationQdrantUpdateLanguage {
	return &e
}
func (e *DestinationQdrantUpdateLanguage) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "cpp":
		fallthrough
	case "go":
		fallthrough
	case "java":
		fallthrough
	case "js":
		fallthrough
	case "php":
		fallthrough
	case "proto":
		fallthrough
	case "python":
		fallthrough
	case "rst":
		fallthrough
	case "ruby":
		fallthrough
	case "rust":
		fallthrough
	case "scala":
		fallthrough
	case "swift":
		fallthrough
	case "markdown":
		fallthrough
	case "latex":
		fallthrough
	case "html":
		fallthrough
	case "sol":
		*e = DestinationQdrantUpdateLanguage(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateLanguage: %v", v)
	}
}

type DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode string

const (
	DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterModeCode DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode = "code"
)

func (e DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode) ToPointer() *DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "code":
		*e = DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode: %v", v)
	}
}

// DestinationQdrantUpdateByProgrammingLanguage - Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.
type DestinationQdrantUpdateByProgrammingLanguage struct {
	// Split code in suitable places based on the programming language
	Language DestinationQdrantUpdateLanguage                                       `json:"language"`
	mode     *DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode `const:"code" json:"mode"`
}

func (d DestinationQdrantUpdateByProgrammingLanguage) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateByProgrammingLanguage) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateByProgrammingLanguage) GetLanguage() DestinationQdrantUpdateLanguage {
	if o == nil {
		return DestinationQdrantUpdateLanguage("")
	}
	return o.Language
}

func (o *DestinationQdrantUpdateByProgrammingLanguage) GetMode() *DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterMode {
	return DestinationQdrantUpdateSchemasProcessingTextSplitterTextSplitterModeCode.ToPointer()
}

type DestinationQdrantUpdateSchemasProcessingTextSplitterMode string

const (
	DestinationQdrantUpdateSchemasProcessingTextSplitterModeMarkdown DestinationQdrantUpdateSchemasProcessingTextSplitterMode = "markdown"
)

func (e DestinationQdrantUpdateSchemasProcessingTextSplitterMode) ToPointer() *DestinationQdrantUpdateSchemasProcessingTextSplitterMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasProcessingTextSplitterMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "markdown":
		*e = DestinationQdrantUpdateSchemasProcessingTextSplitterMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasProcessingTextSplitterMode: %v", v)
	}
}

// DestinationQdrantUpdateByMarkdownHeader - Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.
type DestinationQdrantUpdateByMarkdownHeader struct {
	mode *DestinationQdrantUpdateSchemasProcessingTextSplitterMode `const:"markdown" json:"mode"`
	// Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points
	SplitLevel *int64 `default:"1" json:"split_level"`
}

func (d DestinationQdrantUpdateByMarkdownHeader) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateByMarkdownHeader) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateByMarkdownHeader) GetMode() *DestinationQdrantUpdateSchemasProcessingTextSplitterMode {
	return DestinationQdrantUpdateSchemasProcessingTextSplitterModeMarkdown.ToPointer()
}

func (o *DestinationQdrantUpdateByMarkdownHeader) GetSplitLevel() *int64 {
	if o == nil {
		return nil
	}
	return o.SplitLevel
}

type DestinationQdrantUpdateSchemasProcessingMode string

const (
	DestinationQdrantUpdateSchemasProcessingModeSeparator DestinationQdrantUpdateSchemasProcessingMode = "separator"
)

func (e DestinationQdrantUpdateSchemasProcessingMode) ToPointer() *DestinationQdrantUpdateSchemasProcessingMode {
	return &e
}
func (e *DestinationQdrantUpdateSchemasProcessingMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "separator":
		*e = DestinationQdrantUpdateSchemasProcessingMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for DestinationQdrantUpdateSchemasProcessingMode: %v", v)
	}
}

// DestinationQdrantUpdateBySeparator - Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.
type DestinationQdrantUpdateBySeparator struct {
	// Whether to keep the separator in the resulting chunks
	KeepSeparator *bool                                         `default:"false" json:"keep_separator"`
	mode          *DestinationQdrantUpdateSchemasProcessingMode `const:"separator" json:"mode"`
	// List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n".
	Separators []string `json:"separators,omitempty"`
}

func (d DestinationQdrantUpdateBySeparator) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateBySeparator) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateBySeparator) GetKeepSeparator() *bool {
	if o == nil {
		return nil
	}
	return o.KeepSeparator
}

func (o *DestinationQdrantUpdateBySeparator) GetMode() *DestinationQdrantUpdateSchemasProcessingMode {
	return DestinationQdrantUpdateSchemasProcessingModeSeparator.ToPointer()
}

func (o *DestinationQdrantUpdateBySeparator) GetSeparators() []string {
	if o == nil {
		return nil
	}
	return o.Separators
}

type DestinationQdrantUpdateTextSplitterType string

const (
	DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateBySeparator           DestinationQdrantUpdateTextSplitterType = "destination-qdrant-update_By Separator"
	DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByMarkdownHeader      DestinationQdrantUpdateTextSplitterType = "destination-qdrant-update_By Markdown header"
	DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByProgrammingLanguage DestinationQdrantUpdateTextSplitterType = "destination-qdrant-update_By Programming Language"
)

// DestinationQdrantUpdateTextSplitter - Split text fields into chunks based on the specified method.
type DestinationQdrantUpdateTextSplitter struct {
	DestinationQdrantUpdateBySeparator           *DestinationQdrantUpdateBySeparator           `queryParam:"inline"`
	DestinationQdrantUpdateByMarkdownHeader      *DestinationQdrantUpdateByMarkdownHeader      `queryParam:"inline"`
	DestinationQdrantUpdateByProgrammingLanguage *DestinationQdrantUpdateByProgrammingLanguage `queryParam:"inline"`

	Type DestinationQdrantUpdateTextSplitterType
}

func CreateDestinationQdrantUpdateTextSplitterDestinationQdrantUpdateBySeparator(destinationQdrantUpdateBySeparator DestinationQdrantUpdateBySeparator) DestinationQdrantUpdateTextSplitter {
	typ := DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateBySeparator

	return DestinationQdrantUpdateTextSplitter{
		DestinationQdrantUpdateBySeparator: &destinationQdrantUpdateBySeparator,
		Type:                               typ,
	}
}

func CreateDestinationQdrantUpdateTextSplitterDestinationQdrantUpdateByMarkdownHeader(destinationQdrantUpdateByMarkdownHeader DestinationQdrantUpdateByMarkdownHeader) DestinationQdrantUpdateTextSplitter {
	typ := DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByMarkdownHeader

	return DestinationQdrantUpdateTextSplitter{
		DestinationQdrantUpdateByMarkdownHeader: &destinationQdrantUpdateByMarkdownHeader,
		Type:                                    typ,
	}
}

func CreateDestinationQdrantUpdateTextSplitterDestinationQdrantUpdateByProgrammingLanguage(destinationQdrantUpdateByProgrammingLanguage DestinationQdrantUpdateByProgrammingLanguage) DestinationQdrantUpdateTextSplitter {
	typ := DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByProgrammingLanguage

	return DestinationQdrantUpdateTextSplitter{
		DestinationQdrantUpdateByProgrammingLanguage: &destinationQdrantUpdateByProgrammingLanguage,
		Type: typ,
	}
}

func (u *DestinationQdrantUpdateTextSplitter) UnmarshalJSON(data []byte) error {

	var destinationQdrantUpdateByMarkdownHeader DestinationQdrantUpdateByMarkdownHeader = DestinationQdrantUpdateByMarkdownHeader{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateByMarkdownHeader, "", true, true); err == nil {
		u.DestinationQdrantUpdateByMarkdownHeader = &destinationQdrantUpdateByMarkdownHeader
		u.Type = DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByMarkdownHeader
		return nil
	}

	var destinationQdrantUpdateByProgrammingLanguage DestinationQdrantUpdateByProgrammingLanguage = DestinationQdrantUpdateByProgrammingLanguage{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateByProgrammingLanguage, "", true, true); err == nil {
		u.DestinationQdrantUpdateByProgrammingLanguage = &destinationQdrantUpdateByProgrammingLanguage
		u.Type = DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateByProgrammingLanguage
		return nil
	}

	var destinationQdrantUpdateBySeparator DestinationQdrantUpdateBySeparator = DestinationQdrantUpdateBySeparator{}
	if err := utils.UnmarshalJSON(data, &destinationQdrantUpdateBySeparator, "", true, true); err == nil {
		u.DestinationQdrantUpdateBySeparator = &destinationQdrantUpdateBySeparator
		u.Type = DestinationQdrantUpdateTextSplitterTypeDestinationQdrantUpdateBySeparator
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationQdrantUpdateTextSplitter", string(data))
}

func (u DestinationQdrantUpdateTextSplitter) MarshalJSON() ([]byte, error) {
	if u.DestinationQdrantUpdateBySeparator != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateBySeparator, "", true)
	}

	if u.DestinationQdrantUpdateByMarkdownHeader != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateByMarkdownHeader, "", true)
	}

	if u.DestinationQdrantUpdateByProgrammingLanguage != nil {
		return utils.MarshalJSON(u.DestinationQdrantUpdateByProgrammingLanguage, "", true)
	}

	return nil, errors.New("could not marshal union type DestinationQdrantUpdateTextSplitter: all fields are null")
}

type DestinationQdrantUpdateProcessingConfigModel struct {
	// Size of overlap between chunks in tokens to store in vector store to better capture relevant context
	ChunkOverlap *int64 `default:"0" json:"chunk_overlap"`
	// Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)
	ChunkSize int64 `json:"chunk_size"`
	// List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.
	FieldNameMappings []DestinationQdrantUpdateFieldNameMappingConfigModel `json:"field_name_mappings,omitempty"`
	// List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.
	MetadataFields []string `json:"metadata_fields,omitempty"`
	// List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.
	TextFields []string `json:"text_fields,omitempty"`
	// Split text fields into chunks based on the specified method.
	TextSplitter *DestinationQdrantUpdateTextSplitter `json:"text_splitter,omitempty"`
}

func (d DestinationQdrantUpdateProcessingConfigModel) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdateProcessingConfigModel) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetChunkOverlap() *int64 {
	if o == nil {
		return nil
	}
	return o.ChunkOverlap
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetChunkSize() int64 {
	if o == nil {
		return 0
	}
	return o.ChunkSize
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetFieldNameMappings() []DestinationQdrantUpdateFieldNameMappingConfigModel {
	if o == nil {
		return nil
	}
	return o.FieldNameMappings
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetMetadataFields() []string {
	if o == nil {
		return nil
	}
	return o.MetadataFields
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetTextFields() []string {
	if o == nil {
		return nil
	}
	return o.TextFields
}

func (o *DestinationQdrantUpdateProcessingConfigModel) GetTextSplitter() *DestinationQdrantUpdateTextSplitter {
	if o == nil {
		return nil
	}
	return o.TextSplitter
}

// DestinationQdrantUpdate - The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,
// as well as to provide type safety for the configuration passed to the destination.
//
// The configuration model is composed of four parts:
// * Processing configuration
// * Embedding configuration
// * Indexing configuration
// * Advanced configuration
//
// Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.
type DestinationQdrantUpdate struct {
	// Embedding configuration
	Embedding DestinationQdrantUpdateEmbedding `json:"embedding"`
	// Indexing configuration
	Indexing DestinationQdrantUpdateIndexing `json:"indexing"`
	// Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.
	OmitRawText *bool                                        `default:"false" json:"omit_raw_text"`
	Processing  DestinationQdrantUpdateProcessingConfigModel `json:"processing"`
}

func (d DestinationQdrantUpdate) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(d, "", false)
}

func (d *DestinationQdrantUpdate) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *DestinationQdrantUpdate) GetEmbedding() DestinationQdrantUpdateEmbedding {
	if o == nil {
		return DestinationQdrantUpdateEmbedding{}
	}
	return o.Embedding
}

func (o *DestinationQdrantUpdate) GetIndexing() DestinationQdrantUpdateIndexing {
	if o == nil {
		return DestinationQdrantUpdateIndexing{}
	}
	return o.Indexing
}

func (o *DestinationQdrantUpdate) GetOmitRawText() *bool {
	if o == nil {
		return nil
	}
	return o.OmitRawText
}

func (o *DestinationQdrantUpdate) GetProcessing() DestinationQdrantUpdateProcessingConfigModel {
	if o == nil {
		return DestinationQdrantUpdateProcessingConfigModel{}
	}
	return o.Processing
}
