// Convert_v1_ImageStreamImportSpec_To_image_ImageStreamImportSpec is an autogenerated conversion function.
480665
func Convert_v1_ImageStreamImportSpec_To_image_ImageStreamImportSpec(in *v1.ImageStreamImportSpec, out *image.ImageStreamImportSpec, s conversion.Scope) error {
	return autoConvert_v1_ImageStreamImportSpec_To_image_ImageStreamImportSpec(in, out, s)
}
940281
func Convert_v1_ImageSource_To_build_ImageSource(in *v1.ImageSource, out *build.ImageSource, s conversion.Scope) error {
	return autoConvert_v1_ImageSource_To_build_ImageSource(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
}
640992
func (_m *APIClient) ImageInspectWithRaw(ctx context.Context, _a1 string) (types.ImageInspect, []byte, error) {
	ret := _m.Called(ctx, _a1)

	var r0 types.ImageInspect
	if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok {
		r0 = rf(ctx, _a1)
	} else {
		r0 = ret.Get(0).(types.ImageInspect)
	}

	var r1 []byte
	if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok {
		r1 = rf(ctx, _a1)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]byte)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, string) error); ok {
		r2 = rf(ctx, _a1)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}
81827
func Convert_image_TagImportPolicy_To_v1_TagImportPolicy(in *image.TagImportPolicy, out *v1.TagImportPolicy, s conversion.Scope) error {
	return autoConvert_image_TagImportPolicy_To_v1_TagImportPolicy(in, out, s)
}
224713
func Convert_v1_ImageStreamTagList_To_image_ImageStreamTagList(in *v1.ImageStreamTagList, out *image.ImageStreamTagList, s conversion.Scope) error {
	return autoConvert_v1_ImageStreamTagList_To_image_ImageStreamTagList(in, out, s)
}
596690
func Convert_v1alpha2_FileAssetSpec_To_kops_FileAssetSpec(in *FileAssetSpec, out *kops.FileAssetSpec, s conversion.Scope) error {
	return autoConvert_v1alpha2_FileAssetSpec_To_kops_FileAssetSpec(in, out, s)
}
583834
func (in *ImageImportSpec) DeepCopy() *ImageImportSpec {
	if in == nil {
		return nil
	}
	out := new(ImageImportSpec)
	in.DeepCopyInto(out)
	return out
}
621477
func (c *Config) ImageStream() string {
	v, _ := c.defined["image-stream"].(string)
	if v != "" {
		return v
	}
	return "released"
}
279465
func Convert_build_ImageChangeTrigger_To_v1_ImageChangeTrigger(in *build.ImageChangeTrigger, out *v1.ImageChangeTrigger, s conversion.Scope) error {
	return autoConvert_build_ImageChangeTrigger_To_v1_ImageChangeTrigger(in, out, s)
}
80367
func (r *ImageRef) ImageStream() (*imagev1.ImageStream, error) {
	if r.Stream != nil {
		return r.Stream, nil
	}

	name, ok := r.SuggestName()
	if !ok {
		return nil, fmt.Errorf("unable to suggest an ImageStream name for %q", r.Reference.String())
	}

	stream := &imagev1.ImageStream{
		// this is ok because we know exactly how we want to be serialized
		TypeMeta: metav1.TypeMeta{APIVersion: imagev1.SchemeGroupVersion.String(), Kind: "ImageStream"},
		ObjectMeta: metav1.ObjectMeta{
			Name: name,
		},
	}
	if r.OutputImage {
		return stream, nil
	}

	// Legacy path, talking to a server that cannot do granular import of exact image stream spec tags.
	if !r.TagDirectly {
		// Ignore AsResolvedImage here because we are attempting to get images from this location.
		stream.Spec.DockerImageRepository = r.Reference.AsRepository().String()
		if r.Insecure {
			stream.ObjectMeta.Annotations = map[string]string{
				imageapi.InsecureRepositoryAnnotation: "true",
			}
		}
		return stream, nil
	}

	if stream.Spec.Tags == nil {
		stream.Spec.Tags = []imagev1.TagReference{}
	}

	stream.Spec.Tags = append(stream.Spec.Tags, imagev1.TagReference{
		Name: r.InternalTag(),
		// Make this a constant
		Annotations: map[string]string{"openshift.io/imported-from": r.Reference.Exact()},
		From: &corev1.ObjectReference{
			Kind: "DockerImage",
			Name: r.PullSpec(),
		},
		ImportPolicy: imagev1.TagImportPolicy{Insecure: r.Insecure},
	})

	return stream, nil
}
464536
func Convert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *v1alpha1.ImageReview, s conversion.Scope) error {
	return autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in, out, s)
}
14771
func Convert_kops_EtcdClusterSpec_To_v1alpha2_EtcdClusterSpec(in *kops.EtcdClusterSpec, out *EtcdClusterSpec, s conversion.Scope) error {
	return autoConvert_kops_EtcdClusterSpec_To_v1alpha2_EtcdClusterSpec(in, out, s)
}
758249
func Convert_image_ImageSignature_To_v1_ImageSignature(in *image.ImageSignature, out *v1.ImageSignature, s conversion.Scope) error {
	return autoConvert_image_ImageSignature_To_v1_ImageSignature(in, out, s)
}
94944
func Convert_image_ImageLayer_To_v1_ImageLayer(in *image.ImageLayer, out *v1.ImageLayer, s conversion.Scope) error {
	return autoConvert_image_ImageLayer_To_v1_ImageLayer(in, out, s)
}
510269
func Convert_v1_SignatureCondition_To_image_SignatureCondition(in *v1.SignatureCondition, out *image.SignatureCondition, s conversion.Scope) error {
	return autoConvert_v1_SignatureCondition_To_image_SignatureCondition(in, out, s)
}
362163
func Convert_v1_ImageStreamImportStatus_To_image_ImageStreamImportStatus(in *v1.ImageStreamImportStatus, out *image.ImageStreamImportStatus, s conversion.Scope) error {
	return autoConvert_v1_ImageStreamImportStatus_To_image_ImageStreamImportStatus(in, out, s)
}