code: @BetaApi
    public final Operation setMachineTypeInstance(
        ProjectZoneInstanceName instance,
        InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource) {
  
      SetMachineTypeInstanceHttpRequest request =
          SetMachineTypeInstanceHttpRequest.newBuilder()
              .setInstance(instance == null ? null : instance.toString())
              .setInstancesSetMachineTypeRequestResource(instancesSetMachineTypeRequestResource)
              .build();
      return setMachineTypeInstance(request);
    }
docs: Changes the machine type for a stopped instance to the machine type specified in the request.
  
  <p>Sample code:
  
  <pre><code>
  try (InstanceClient instanceClient = InstanceClient.create()) {
  ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
  InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = InstancesSetMachineTypeRequest.newBuilder().build();
  Operation response = instanceClient.setMachineTypeInstance(instance, instancesSetMachineTypeRequestResource);
  }
  </code></pre>
  
  @param instance Name of the instance scoping this request.
  @param instancesSetMachineTypeRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails