func GenerateCryptoKeyInstance(in v1alpha1.CryptoKeyParameters, ck *cloudkms.CryptoKey) {
	ck.Labels = in.Labels
	ck.Purpose = in.Purpose
	ck.RotationPeriod = gcp.StringValue(in.RotationPeriod)
	ck.NextRotationTime = gcp.StringValue(in.NextRotationTime)
	if in.VersionTemplate != nil {
		if ck.VersionTemplate == nil {
			ck.VersionTemplate = &cloudkms.CryptoKeyVersionTemplate{}
		}
		ck.VersionTemplate.Algorithm = gcp.StringValue(in.VersionTemplate.Algorithm)
		ck.VersionTemplate.ProtectionLevel = gcp.StringValue(in.VersionTemplate.ProtectionLevel)
	}
}
GenerateCryptoKeyInstance generates *kmsv1.CryptoKey instance from CryptoKeyParameters.
package cryptokey
import (
	"strings"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	"github.com/mitchellh/copystructure"
	"google.golang.org/api/cloudkms/v1"
	"github.com/crossplane/crossplane-runtime/pkg/errors"
	"github.com/crossplane/provider-gcp/apis/kms/v1alpha1"
	gcp "github.com/crossplane/provider-gcp/pkg/clients"
)
const errCheckUpToDate = "unable to determine if external resource is up to date"
type Client interface {
	Create(parent string, cryptokey *cloudkms.CryptoKey) *cloudkms.ProjectsLocationsKeyRingsCryptoKeysCreateCall
	Get(name string) *cloudkms.ProjectsLocationsKeyRingsCryptoKeysGetCall
	Patch(name string, cryptokey *cloudkms.CryptoKey) *cloudkms.ProjectsLocationsKeyRingsCryptoKeysPatchCall
}