// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.

package main

import (
	"go.opentelemetry.io/collector/connector"
	"go.opentelemetry.io/collector/exporter"
	"go.opentelemetry.io/collector/extension"
	"go.opentelemetry.io/collector/otelcol"
	"go.opentelemetry.io/collector/processor"
	"go.opentelemetry.io/collector/receiver"
	{{- range .Connectors}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Exporters}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Extensions}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Processors}}
	{{.Name}} "{{.Import}}"
	{{- end}}
	{{- range .Receivers}}
	{{.Name}} "{{.Import}}"
	{{- end}}
)

func components() (otelcol.Factories, error) {
	var err error
	factories := otelcol.Factories{}

	factories.Extensions, err = extension.MakeFactoryMap(
		{{- range .Extensions}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return otelcol.Factories{}, err
	}

	factories.Receivers, err = receiver.MakeFactoryMap(
		{{- range .Receivers}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return otelcol.Factories{}, err
	}

	factories.Exporters, err = exporter.MakeFactoryMap(
		{{- range .Exporters}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return otelcol.Factories{}, err
	}

	factories.Processors, err = processor.MakeFactoryMap(
		{{- range .Processors}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return otelcol.Factories{}, err
	}

	factories.Connectors, err = connector.MakeFactoryMap(
		{{- range .Connectors}}
		{{.Name}}.NewFactory(),
		{{- end}}
	)
	if err != nil {
		return otelcol.Factories{}, err
	}

	return factories, nil
}
