func (p *ResourceGroupStatusProperties) ConvertToARM(name string, resolvedReferences genruntime.ResolvedReferences) (interface{}, error) {
	if p == nil {
		return nil, nil
	}
	result := ResourceGroupStatusPropertiesArm{}
	result.ProvisioningState = p.ProvisioningState
	return result, nil
}
ConvertToArm converts from a Kubernetes CRD object to an ARM object
package v1alpha1api20200601
import (
	"fmt"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
	"github.com/Azure/k8s-infra/hack/generated/pkg/genruntime"
)
type ResourceGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ResourceGroupSpec   `json:"spec,omitempty"`
	Status            ResourceGroupStatus `json:"status,omitempty"`
}
var _ admission.Defaulter = &ResourceGroup{}
func (rg *ResourceGroup) Default() {
	if rg.Spec.AzureName == "" {
		rg.Spec.AzureName = rg.Name
	}
}
var _ genruntime.KubernetesResource = &ResourceGroup{}
func (rg *ResourceGroup) AzureName() string {
	return rg.Spec.AzureName
}
func (rg *ResourceGroup) Owner() *genruntime.ResourceReference {
	return nil
}
var _ genruntime.LocatableResource = &ResourceGroup{}
func (rg *ResourceGroup) Location() string {
	return rg.Spec.Location
}
type ResourceGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ResourceGroup `json:"items"`
}
type ResourceGroupStatus struct {
	ID string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Location string `json:"location,omitempty"`
	ManagedBy string `json:"managedBy,omitempty"`
	Tags map[string]string `json:"tags,omitempty"`
	Properties *ResourceGroupStatusProperties `json:"properties,omitempty"`  
}
var _ genruntime.ARMTransformer = &ResourceGroupStatus{}
func (status *ResourceGroupStatus) CreateEmptyARMValue() interface{} {
	return ResourceGroupStatusArm{}
}
func (status *ResourceGroupStatus) ConvertToARM(name string, resolvedReferences genruntime.ResolvedReferences) (interface{}, error) {
	if status == nil {
		return nil, nil
	}
	result := ResourceGroupStatusArm{}
	result.ID = status.ID
	result.Location = status.Location
	result.ManagedBy = status.ManagedBy
	result.Name = status.Name
	result.Tags = status.Tags
	if status.Properties != nil {
		properties, err := status.Properties.ConvertToARM(name, resolvedReferences)
		if err != nil {
			return nil, err
		}
		propertiesTyped := properties.(ResourceGroupStatusPropertiesArm)
		result.Properties = &propertiesTyped
	}
	return result, nil
}
func (status *ResourceGroupStatus) PopulateFromARM(owner genruntime.KnownResourceReference, armInput interface{}) error {
	typedInput, ok := armInput.(ResourceGroupStatusArm)
	if !ok {
		return fmt.Errorf("unexpected type supplied for PopulateFromArm() function. Expected ResourceGroupStatusArm, got %T", armInput)
	}
	status.ID = typedInput.ID
	status.Location = typedInput.Location
	status.ManagedBy = typedInput.ManagedBy
	status.Name = typedInput.Name
	status.Tags = typedInput.Tags
	var err error
	if typedInput.Properties != nil {
		properties := ResourceGroupStatusProperties{}
		err = properties.PopulateFromARM(owner, *typedInput.Properties)
		if err != nil {
			return err
		}
		status.Properties = &properties
	}
	return nil
}
type ResourceGroupStatusProperties struct {
	ProvisioningState string `json:"provisioningState,omitempty"`  
}
var _ genruntime.ARMTransformer = &ResourceGroupStatusProperties{}
func (p *ResourceGroupStatusProperties) CreateEmptyARMValue() interface{} {
	return ResourceGroupStatusPropertiesArm{}
}