code: @BetaApi
    public final Operation setDeletionProtectionInstance(
        ProjectZoneInstanceResourceName resource, Boolean deletionProtection) {
  
      SetDeletionProtectionInstanceHttpRequest request =
          SetDeletionProtectionInstanceHttpRequest.newBuilder()
              .setResource(resource == null ? null : resource.toString())
              .setDeletionProtection(deletionProtection)
              .build();
      return setDeletionProtectionInstance(request);
    }
docs: Sets deletion protection on the instance.
  
  <p>Sample code:
  
  <pre><code>
  try (InstanceClient instanceClient = InstanceClient.create()) {
  ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
  Boolean deletionProtection = false;
  Operation response = instanceClient.setDeletionProtectionInstance(resource, deletionProtection);
  }
  </code></pre>
  
  @param resource Name or id of the resource for this request.
  @param deletionProtection Whether the resource should be protected against deletion.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails