func GenerateAuthStringObservation(r redis.InstanceAuthString) string {
	return r.AuthString
}
GenerateAuthStringObservation is used to produce an observation object from GCP's Redis
Instance AuthString data.
package cloudmemorystore
import (
	"fmt"
	"time"
	"github.com/google/go-cmp/cmp"
	"github.com/mitchellh/copystructure"
	redis "google.golang.org/api/redis/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"github.com/crossplane/crossplane-runtime/pkg/errors"
	"github.com/crossplane/provider-gcp/apis/cache/v1beta1"
	gcp "github.com/crossplane/provider-gcp/pkg/clients"
)
const (
	instanceNameFormat = "projects/%s/locations/%s/instances/%s"
	parentFormat       = "projects/%s/locations/%s"
)
const (
	StateUnspecified = "STATE_UNSPECIFIED"
	StateCreating    = "CREATING"
	StateReady       = "READY"
	StateUpdating    = "UPDATING"
	StateDeleting    = "DELETING"
	StateRepairing   = "REPAIRING"
	StateMaintenance = "MAINTENANCE"
	StateImporting   = "IMPORTING"
	StateFailingOver = "FAILING_OVER"
)
const errCheckUpToDate = "unable to determine if external resource is up to date"
func GetFullyQualifiedParent(project string, p v1beta1.CloudMemorystoreInstanceParameters) string {
	return fmt.Sprintf(parentFormat, project, p.Region)
}
func GetFullyQualifiedName(project string, p v1beta1.CloudMemorystoreInstanceParameters, name string) string {
	return fmt.Sprintf(instanceNameFormat, project, p.Region, name)
}
func GenerateRedisInstance(name string, s v1beta1.CloudMemorystoreInstanceParameters, r *redis.Instance) {
	r.Name = name
	r.Tier = s.Tier
	r.MemorySizeGb = s.MemorySizeGB
	r.Labels = s.Labels
	r.RedisConfigs = s.RedisConfigs
	r.DisplayName = gcp.StringValue(s.DisplayName)
	r.LocationId = gcp.StringValue(s.LocationID)
	r.AlternativeLocationId = gcp.StringValue(s.AlternativeLocationID)
	r.RedisVersion = gcp.StringValue(s.RedisVersion)
	r.ReservedIpRange = gcp.StringValue(s.ReservedIPRange)
	r.AuthorizedNetwork = gcp.StringValue(s.AuthorizedNetwork)
	r.ConnectMode = gcp.StringValue(s.ConnectMode)
	r.AuthEnabled = gcp.BoolValue(s.AuthEnabled)
}
func GenerateObservation(r redis.Instance) v1beta1.CloudMemorystoreInstanceObservation {
	o := v1beta1.CloudMemorystoreInstanceObservation{
		Name:                   r.Name,
		Host:                   r.Host,
		Port:                   r.Port,
		CurrentLocationID:      r.CurrentLocationId,
		State:                  r.State,
		StatusMessage:          r.StatusMessage,
		PersistenceIAMIdentity: r.PersistenceIamIdentity,
	}
	t, err := time.Parse(time.RFC3339, r.CreateTime)
	if err != nil {
		return o
	}
	m := metav1.NewTime(t)
	o.CreateTime = &m
	return o
}