func (c *armConversionApplier) getARMTypeDefinition(name astmodel.TypeName) (astmodel.TypeDefinition, error) {
	armDefinition, ok := c.definitions[astmodel.CreateARMTypeName(name)]
	if !ok {
		return astmodel.TypeDefinition{}, errors.Errorf("couldn't find arm definition matching kube name %q", name)
	}
	return armDefinition, nil
}
getARMTypeDefinition gets the ARM type definition for a given Kubernetes type name.
If no matching definition can be found an error is returned.
package codegen
import (
	"context"
	"strings"
	"github.com/pkg/errors"
	"github.com/Azure/k8s-infra/hack/generator/pkg/astmodel"
	"github.com/Azure/k8s-infra/hack/generator/pkg/astmodel/armconversion"
)
func applyARMConversionInterface(idFactory astmodel.IdentifierFactory) PipelineStage {
	return MakePipelineStage(
		"applyArmConversionInterface",
		"Apply the ARM conversion interface to Kubernetes types",
		func(ctx context.Context, definitions astmodel.Types) (astmodel.Types, error) {
			converter := &armConversionApplier{
				definitions: definitions,
				idFactory:   idFactory,
			}
			return converter.transformTypes()
		})
}
type armConversionApplier struct {
	definitions astmodel.Types
	idFactory   astmodel.IdentifierFactory
}