// Convert_v1_TagImportPolicy_To_image_TagImportPolicy is an autogenerated conversion function.
328069
func Convert_v1_TagImportPolicy_To_image_TagImportPolicy(in *v1.TagImportPolicy, out *image.TagImportPolicy, s conversion.Scope) error {
	return autoConvert_v1_TagImportPolicy_To_image_TagImportPolicy(in, out, s)
}
4383
func Convert_v1_ImageConfig_To_config_ImageConfig(in *v1.ImageConfig, out *config.ImageConfig, s conversion.Scope) error {
	return autoConvert_v1_ImageConfig_To_config_ImageConfig(in, out, s)
}
704555
func Convert_image_ImageImportStatus_To_v1_ImageImportStatus(in *image.ImageImportStatus, out *v1.ImageImportStatus, s conversion.Scope) error {
	return autoConvert_image_ImageImportStatus_To_v1_ImageImportStatus(in, out, s)
}
229658
func Convert_v1_TagReference_To_image_TagReference(in *v1.TagReference, out *image.TagReference, s conversion.Scope) error {
	return autoConvert_v1_TagReference_To_image_TagReference(in, out, s)
}
527263
func Convert_v1beta1_PodSecurityPolicy_To_policy_PodSecurityPolicy(in *v1beta1.PodSecurityPolicy, out *policy.PodSecurityPolicy, s conversion.Scope) error {
	return autoConvert_v1beta1_PodSecurityPolicy_To_policy_PodSecurityPolicy(in, out, s)
}
546868
func (r Virtual_Disk_Image) GetImportedDiskType() (resp string, err error) {
	err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getImportedDiskType", nil, &r.Options, &resp)
	return
}
636952
func Convert_image_TagReference_To_v1_TagReference(in *image.TagReference, out *v1.TagReference, s conversion.Scope) error {
	return autoConvert_image_TagReference_To_v1_TagReference(in, out, s)
}
480831
func Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(in *v1alpha1.ImageReviewSpec, out *imagepolicy.ImageReviewSpec, s conversion.Scope) error {
	return autoConvert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(in, out, s)
}
1002688
func Convert_image_Image_To_v1_Image(in *newer.Image, out *v1.Image, s conversion.Scope) error {
	out.ObjectMeta = in.ObjectMeta
	out.DockerImageReference = in.DockerImageReference
	out.DockerImageManifest = in.DockerImageManifest
	out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
	out.DockerImageConfig = in.DockerImageConfig

	gvString := in.DockerImageMetadataVersion
	if len(gvString) == 0 {
		gvString = "1.0"
	}
	if !strings.Contains(gvString, "/") {
		gvString = "/" + gvString
	}

	version, err := schema.ParseGroupVersion(gvString)
	if err != nil {
		return err
	}
	data, err := runtime.Encode(dockerImageCodecs.LegacyCodec(version), &in.DockerImageMetadata)
	if err != nil {
		return err
	}
	out.DockerImageMetadata.Raw = data
	out.DockerImageMetadataVersion = version.Version

	if in.DockerImageLayers != nil {
		out.DockerImageLayers = make([]v1.ImageLayer, len(in.DockerImageLayers))
		for i := range in.DockerImageLayers {
			out.DockerImageLayers[i].MediaType = in.DockerImageLayers[i].MediaType
			out.DockerImageLayers[i].Name = in.DockerImageLayers[i].Name
			out.DockerImageLayers[i].LayerSize = in.DockerImageLayers[i].LayerSize
		}
	} else {
		out.DockerImageLayers = nil
	}

	if in.Signatures != nil {
		out.Signatures = make([]v1.ImageSignature, len(in.Signatures))
		for i := range in.Signatures {
			if err := s.Convert(&in.Signatures[i], &out.Signatures[i], 0); err != nil {
				return err
			}
		}
	} else {
		out.Signatures = nil
	}

	if in.DockerImageSignatures != nil {
		out.DockerImageSignatures = make([][]byte, 0, len(in.DockerImageSignatures))
		out.DockerImageSignatures = append(out.DockerImageSignatures, in.DockerImageSignatures...)
	} else {
		out.DockerImageSignatures = nil
	}

	return nil
}
727841
func Convert_networking_NetworkPolicy_To_v1_NetworkPolicy(in *networking.NetworkPolicy, out *v1.NetworkPolicy, s conversion.Scope) error {
	return autoConvert_networking_NetworkPolicy_To_v1_NetworkPolicy(in, out, s)
}
992925
func AttributeImports(att *design.AttributeDefinition, imports []*ImportSpec, seen []*design.AttributeDefinition) []*ImportSpec {

	for _, a := range seen {
		if att == a {
			return imports
		}
	}
	seen = append(seen, att)

	if tname, ok := att.Metadata["struct:field:type"]; ok {
		if len(tname) > 1 {
			tagImp := SimpleImport(tname[1])
			impSlice := []*ImportSpec{tagImp}
			imports = appendImports(imports, impSlice)
		}
	}

	switch t := att.Type.(type) {
	case *design.UserTypeDefinition:
		return appendImports(imports, AttributeImports(t.AttributeDefinition, imports, seen))
	case *design.MediaTypeDefinition:
		return appendImports(imports, AttributeImports(t.AttributeDefinition, imports, seen))
	case design.Object:
		t.IterateAttributes(func(n string, t *design.AttributeDefinition) error {
			imports = appendImports(imports, AttributeImports(t, imports, seen))
			return nil
		})
		return imports
	case *design.Array:
		return appendImports(imports, AttributeImports(t.ElemType, imports, seen))
	case *design.Hash:
		imports = appendImports(imports, AttributeImports(t.KeyType, imports, seen))
		return appendImports(imports, AttributeImports(t.ElemType, imports, seen))
	}

	return imports
}
303403
func Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(in *imagepolicy.ImageReviewSpec, out *v1alpha1.ImageReviewSpec, s conversion.Scope) error {
	return autoConvert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(in, out, s)
}
935945
func Convert_security_PodSecurityPolicyReview_To_v1_PodSecurityPolicyReview(in *security.PodSecurityPolicyReview, out *v1.PodSecurityPolicyReview, s conversion.Scope) error {
	return autoConvert_security_PodSecurityPolicyReview_To_v1_PodSecurityPolicyReview(in, out, s)
}
1135327
func Convert_Slice_string_To_v1_IncludeObjectPolicy(input *[]string, out *IncludeObjectPolicy, s conversion.Scope) error {
	if len(*input) > 0 {
		*out = IncludeObjectPolicy((*input)[0])
	}
	return nil
}
1358707
func tagsFromMapTransfer(m map[string]interface{}) []*transfer.Tag {
	result := make([]*transfer.Tag, 0, len(m))
	for k, v := range m {
		t := &transfer.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredTransfer(t) {
			result = append(result, t)
		}
	}

	return result
}
56165
func Convert_DockerV1CompatibilityImage_to_DockerImageConfig(in *DockerV1CompatibilityImage, out *DockerImageConfig) error {
	*out = DockerImageConfig{
		ID:              in.ID,
		Parent:          in.Parent,
		Comment:         in.Comment,
		Created:         in.Created,
		Container:       in.Container,
		DockerVersion:   in.DockerVersion,
		Author:          in.Author,
		Architecture:    in.Architecture,
		Size:            in.Size,
		OS:              "linux",
		ContainerConfig: in.ContainerConfig,
	}
	if in.Config != nil {
		out.Config = &DockerConfig{}
		*out.Config = *in.Config
	}
	return nil
}
607259
func (i *ImageService) TagImage(imageName, repository, tag string) (string, error) {
	img, err := i.GetImage(imageName)
	if err != nil {
		return "", err
	}

	newTag, err := reference.ParseNormalizedNamed(repository)
	if err != nil {
		return "", err
	}
	if tag != "" {
		if newTag, err = reference.WithTag(reference.TrimNamed(newTag), tag); err != nil {
			return "", err
		}
	}

	err = i.TagImageWithReference(img.ID(), newTag)
	return reference.FamiliarString(newTag), err
}