code: @BetaApi
    public final Operation setLabelsSnapshot(
        String resource, GlobalSetLabelsRequest globalSetLabelsRequestResource) {
  
      SetLabelsSnapshotHttpRequest request =
          SetLabelsSnapshotHttpRequest.newBuilder()
              .setResource(resource)
              .setGlobalSetLabelsRequestResource(globalSetLabelsRequestResource)
              .build();
      return setLabelsSnapshot(request);
    }
docs: Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources
  documentation.
  
  <p>Sample code:
  
  <pre><code>
  try (SnapshotClient snapshotClient = SnapshotClient.create()) {
  ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
  GlobalSetLabelsRequest globalSetLabelsRequestResource = GlobalSetLabelsRequest.newBuilder().build();
  Operation response = snapshotClient.setLabelsSnapshot(resource.toString(), globalSetLabelsRequestResource);
  }
  </code></pre>
  
  @param resource Name or id of the resource for this request.
  @param globalSetLabelsRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails