// Code generated by pkg/config/schema/codegen/tools/collections.main.go. DO NOT EDIT.

package {{.PackageName}}

import (
	"istio.io/istio/pkg/config"

{{- range .Packages}}
	{{.ImportName}} "{{.PackageName}}"
{{- end}}
	apiistioioapiextensionsv1alpha1 "istio.io/client-go/pkg/apis/extensions/v1alpha1"
	apiistioioapinetworkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
	apiistioioapinetworkingv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1"
	apiistioioapinetworkingv1 "istio.io/client-go/pkg/apis/networking/v1"
	apiistioioapisecurityv1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
	apiistioioapisecurityv1 "istio.io/client-go/pkg/apis/security/v1"
	apiistioioapitelemetryv1alpha1 "istio.io/client-go/pkg/apis/telemetry/v1alpha1"
	apiistioioapitelemetryv1"istio.io/client-go/pkg/apis/telemetry/v1"
)

func getGvk(obj any) (config.GroupVersionKind, bool) {
	switch obj.(type) {
{{- range .Entries }}
	case *{{ .ClientImport }}.{{ .Resource.Kind }}:
		return gvk.{{ .Resource.Identifier }}, true
	{{- if and (not (eq .ClientImport .IstioAwareClientImport)) (not .Resource.Synthetic) }}
	case *{{ .IstioAwareClientImport }}.{{ .Resource.Kind }}:
		return gvk.{{ .Resource.Identifier }}, true
    {{- end }}
{{- end }}
  default:
    return config.GroupVersionKind{}, false
	}
}
