Please add the FromExternal method to BackupVaultIdentity in apis/netapp/v1alpha1/backupvault_identity.go.
This requires refactoring the struct to support gcpurls.
var BackupVaultIdentityFormat = gcpurls.Template[BackupVaultIdentity]("netapp.googleapis.com", "projects/{project}/locations/{location}/backupVaults/{backupVault}")
type BackupVaultIdentity struct {
Project string
Location string
BackupVault string
}
func (i *BackupVaultIdentity) FromExternal(ref string) error {
parsed, match, err := BackupVaultIdentityFormat.Parse(ref)
if err != nil {
return fmt.Errorf("format of BackupVault external=%q was not known (use %s): %w", ref, BackupVaultIdentityFormat.CanonicalFormat(), err)
}
if !match {
return fmt.Errorf("format of BackupVault external=%q was not known (use %s)", ref, BackupVaultIdentityFormat.CanonicalFormat())
}
*i = *parsed
return nil
}
Please add the FromExternal method to BackupVaultIdentity in
apis/netapp/v1alpha1/backupvault_identity.go.This requires refactoring the struct to support
gcpurls.