func autoConvert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(in *ImageStreamImportStatus, out *api.ImageStreamImportStatus, s conversion.Scope) error {
	if in.Import != nil {
		in, out := &in.Import, &out.Import
		*out = new(api.ImageStream)
		if err := Convert_v1_ImageStream_To_api_ImageStream(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Import = nil
	}
	if in.Repository != nil {
		in, out := &in.Repository, &out.Repository
		*out = new(api.RepositoryImportStatus)
		if err := Convert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Repository = nil
	}
	if in.Images != nil {
		in, out := &in.Images, &out.Images
		*out = make([]api.ImageImportStatus, len(*in))
		for i := range *in {
			if err := Convert_v1_ImageImportStatus_To_api_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Images = nil
	}
	return nil
}
예제 #2
0
func autoConvert_v1_ImageStreamImportStatus_To_api_ImageStreamImportStatus(in *ImageStreamImportStatus, out *image_api.ImageStreamImportStatus, s conversion.Scope) error {
	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
		defaulting.(func(*ImageStreamImportStatus))(in)
	}
	if in.Import != nil {
		in, out := &in.Import, &out.Import
		*out = new(image_api.ImageStream)
		if err := Convert_v1_ImageStream_To_api_ImageStream(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Import = nil
	}
	if in.Repository != nil {
		in, out := &in.Repository, &out.Repository
		*out = new(image_api.RepositoryImportStatus)
		if err := Convert_v1_RepositoryImportStatus_To_api_RepositoryImportStatus(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Repository = nil
	}
	if in.Images != nil {
		in, out := &in.Images, &out.Images
		*out = make([]image_api.ImageImportStatus, len(*in))
		for i := range *in {
			if err := Convert_v1_ImageImportStatus_To_api_ImageImportStatus(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Images = nil
	}
	return nil
}