code: @BetaApi
    public final Operation setInstanceTemplateRegionInstanceGroupManager(
        String instanceGroupManager,
        RegionInstanceGroupManagersSetTemplateRequest
            regionInstanceGroupManagersSetTemplateRequestResource) {
  
      SetInstanceTemplateRegionInstanceGroupManagerHttpRequest request =
          SetInstanceTemplateRegionInstanceGroupManagerHttpRequest.newBuilder()
              .setInstanceGroupManager(instanceGroupManager)
              .setRegionInstanceGroupManagersSetTemplateRequestResource(
                  regionInstanceGroupManagersSetTemplateRequestResource)
              .build();
      return setInstanceTemplateRegionInstanceGroupManager(request);
    }
docs: Sets the instance template to use when creating new instances or recreating instances in this
  group. Existing instances are not affected.
  
  <p>Sample code:
  
  <pre><code>
  try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
  ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
  RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource = RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build();
  Operation response = regionInstanceGroupManagerClient.setInstanceTemplateRegionInstanceGroupManager(instanceGroupManager.toString(), regionInstanceGroupManagersSetTemplateRequestResource);
  }
  </code></pre>
  
  @param instanceGroupManager The name of the managed instance group.
  @param regionInstanceGroupManagersSetTemplateRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails