public final ListSubscriptionsPagedResponse listSubscriptions(String filter) {
    ListSubscriptionsRequest request =
        ListSubscriptionsRequest.newBuilder().setFilter(filter).build();
    return listSubscriptions(request);
  }
Lists Google Workspace subscriptions. To learn how to use this method, see [List Google
Workspace
subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SubscriptionsServiceClient subscriptionsServiceClient =
    SubscriptionsServiceClient.create()) {
  String filter = "filter-1274492040";
  for (Subscription element :
      subscriptionsServiceClient.listSubscriptions(filter).iterateAll()) {
    // doThingsWith(element);
  }
}
}</pre>

@param filter Required. A query filter.
    <p>You can filter subscriptions by event type (`event_types`) and target resource
    (`target_resource`).
    <p>You must specify at least one event type in your query. To filter for multiple event
    types, use the `OR` operator.
    <p>To filter by both event type and target resource, use the `AND` operator and specify the
    full resource name, such as `//chat.googleapis.com/spaces/{space}`.
    <p>For example, the following queries are valid:
    <p>``` event_types:"google.workspace.chat.membership.v1.updated" OR
    event_types:"google.workspace.chat.message.v1.created"
    <p>event_types:"google.workspace.chat.message.v1.created" AND
    target_resource="//chat.googleapis.com/spaces/{space}"
    <p>( event_types:"google.workspace.chat.membership.v1.updated" OR
    event_types:"google.workspace.chat.message.v1.created" ) AND
    target_resource="//chat.googleapis.com/spaces/{space}" ```
    <p>The server rejects invalid queries with an `INVALID_ARGUMENT` error.
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-workspaceevents/google-cloud-workspaceevents/src/main/java/com/google/apps/events/subscriptions/v1/SubscriptionsServiceClient.java