code: @BetaApi
    public final Operation setMetadataInstance(
        ProjectZoneInstanceName instance, Metadata metadataResource) {
  
      SetMetadataInstanceHttpRequest request =
          SetMetadataInstanceHttpRequest.newBuilder()
              .setInstance(instance == null ? null : instance.toString())
              .setMetadataResource(metadataResource)
              .build();
      return setMetadataInstance(request);
    }
docs: Sets metadata for the specified instance to the data included in the request.
  
  <p>Sample code:
  
  <pre><code>
  try (InstanceClient instanceClient = InstanceClient.create()) {
  ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
  Metadata metadataResource = Metadata.newBuilder().build();
  Operation response = instanceClient.setMetadataInstance(instance, metadataResource);
  }
  </code></pre>
  
  @param instance Name of the instance scoping this request.
  @param metadataResource A metadata key/value entry.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails