# Class AdminServiceClient (1.16.5)

1.16.5 (latest) 1.16.2 1.15.21 1.14.8 1.13.8 1.12.22 1.11.2 1.10.0 1.9.4 1.8.0 1.7.1 1.6.3 1.5.5 1.4.12

|---|---|
| [GitHub Repository](https://github.com/googleapis/java-pubsublite/tree/main//google-cloud-pubsublite/src/main/java/com/google/cloud/pubsublite/v1/AdminServiceClient.java) | [Product Reference](https://cloud.google.com/pubsub/lite/docs) |

Service Description: The service that a client application uses to manage topics and
subscriptions, such creating, listing, and deleting topics and subscriptions.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:


     // 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Topic topic = Topic.newBuilder().build();
       String topicId = "topicId-1139259734";
       Topic response = adminServiceClient.createTopic(parent, topic, topicId);
     }
     
Note: close() needs to be called on the AdminServiceClient object to clean up resources such
as threads. In the example above, try-with-resources is used, which automatically calls close().

| Method | Description | Method Variants |
|---|---|---|
| CreateTopic | Creates a new topic. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createTopic(CreateTopicRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createTopic(LocationName parent, Topic topic, String topicId) - createTopic(String parent, Topic topic, String topicId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createTopicCallable() |
| GetTopic | Returns the topic configuration. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getTopic(GetTopicRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getTopic(TopicName name) - getTopic(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getTopicCallable() |
| GetTopicPartitions | Returns the partition information for the requested topic. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getTopicPartitions(GetTopicPartitionsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getTopicPartitions(TopicName name) - getTopicPartitions(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getTopicPartitionsCallable() |
| ListTopics | Returns the list of topics for the given project. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listTopics(ListTopicsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listTopics(LocationName parent) - listTopics(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listTopicsPagedCallable() - listTopicsCallable() |
| UpdateTopic | Updates properties of the specified topic. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateTopic(UpdateTopicRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateTopic(Topic topic, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateTopicCallable() |
| DeleteTopic | Deletes the specified topic. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteTopic(DeleteTopicRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteTopic(TopicName name) - deleteTopic(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteTopicCallable() |
| ListTopicSubscriptions | Lists the subscriptions attached to the specified topic. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listTopicSubscriptions(ListTopicSubscriptionsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listTopicSubscriptions(TopicName name) - listTopicSubscriptions(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listTopicSubscriptionsPagedCallable() - listTopicSubscriptionsCallable() |
| CreateSubscription | Creates a new subscription. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createSubscription(CreateSubscriptionRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createSubscription(LocationName parent, Subscription subscription, String subscriptionId) - createSubscription(String parent, Subscription subscription, String subscriptionId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createSubscriptionCallable() |
| GetSubscription | Returns the subscription configuration. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getSubscription(GetSubscriptionRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getSubscription(SubscriptionName name) - getSubscription(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getSubscriptionCallable() |
| ListSubscriptions | Returns the list of subscriptions for the given project. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listSubscriptions(ListSubscriptionsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listSubscriptions(LocationName parent) - listSubscriptions(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listSubscriptionsPagedCallable() - listSubscriptionsCallable() |
| UpdateSubscription | Updates properties of the specified subscription. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateSubscription(UpdateSubscriptionRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateSubscription(Subscription subscription, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateSubscriptionCallable() |
| DeleteSubscription | Deletes the specified subscription. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteSubscription(DeleteSubscriptionRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteSubscription(SubscriptionName name) - deleteSubscription(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteSubscriptionCallable() |
| SeekSubscription | Performs an out-of-band seek for a subscription to a specified target, which may be timestamps or named positions within the message backlog. Seek translates these targets to cursors for each partition and orchestrates subscribers to start consuming messages from these seek cursors. If an operation is returned, the seek has been registered and subscribers will eventually receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a minimum supported client library version and not a system that tracks cursors independently of Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported clients. If clients would like to know when subscribers react to the seek (or not), they can poll the operation. The seek operation will succeed and complete once subscribers are ready to receive messages from the seek cursors for all partitions of the topic. This means that the seek operation will not complete until all subscribers come online. If the previous seek operation has not yet completed, it will be aborted and the new invocation of seek will supersede it. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - seekSubscriptionAsync(SeekSubscriptionRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - seekSubscriptionOperationCallable() - seekSubscriptionCallable() |
| CreateReservation | Creates a new reservation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createReservation(CreateReservationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createReservation(LocationName parent, Reservation reservation, String reservationId) - createReservation(String parent, Reservation reservation, String reservationId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createReservationCallable() |
| GetReservation | Returns the reservation configuration. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getReservation(GetReservationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getReservation(ReservationName name) - getReservation(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getReservationCallable() |
| ListReservations | Returns the list of reservations for the given project. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listReservations(ListReservationsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listReservations(LocationName parent) - listReservations(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listReservationsPagedCallable() - listReservationsCallable() |
| UpdateReservation | Updates properties of the specified reservation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateReservation(UpdateReservationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateReservation(Reservation reservation, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateReservationCallable() |
| DeleteReservation | Deletes the specified reservation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteReservation(DeleteReservationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteReservation(ReservationName name) - deleteReservation(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteReservationCallable() |
| ListReservationTopics | Lists the topics attached to the specified reservation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listReservationTopics(ListReservationTopicsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listReservationTopics(ReservationName name) - listReservationTopics(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listReservationTopicsPagedCallable() - listReservationTopicsCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of AdminServiceSettings to
create(). For example:

To customize credentials:


     // 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
     AdminServiceSettings adminServiceSettings =
         AdminServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     AdminServiceClient adminServiceClient = AdminServiceClient.create(adminServiceSettings);
     
To customize the endpoint:


     // 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
     AdminServiceSettings adminServiceSettings =
         AdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     AdminServiceClient adminServiceClient = AdminServiceClient.create(adminServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> AdminServiceClient

## Static Methods

### create()

    public static final AdminServiceClient create()

Constructs an instance of AdminServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(AdminServiceSettings settings)

    public static final AdminServiceClient create(AdminServiceSettings settings)

Constructs an instance of AdminServiceClient, using the given settings. The channels are
created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(AdminServiceStub stub)

    public static final AdminServiceClient create(AdminServiceStub stub)

Constructs an instance of AdminServiceClient, using the given stub for making calls. This is
for advanced usage - prefer using create(AdminServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.stub.AdminServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient` |   |

## Constructors

### AdminServiceClient(AdminServiceSettings settings)

    protected AdminServiceClient(AdminServiceSettings settings)

Constructs an instance of AdminServiceClient, using the given settings. This is protected so
that it is easy to make a subclass, but otherwise, the static factory methods should be
preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceSettings` |

### AdminServiceClient(AdminServiceStub stub)

    protected AdminServiceClient(AdminServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.stub.AdminServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createReservation(CreateReservationRequest request)

    public final Reservation createReservation(CreateReservationRequest request)

Creates a new reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateReservationRequest request =
           CreateReservationRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setReservation(Reservation.newBuilder().build())
               .setReservationId("reservationId1116965383")
               .build();
       Reservation response = adminServiceClient.createReservation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateReservationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### createReservation(LocationName parent, Reservation reservation, String reservationId)

    public final Reservation createReservation(LocationName parent, Reservation reservation, String reservationId)

Creates a new reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Reservation reservation = Reservation.newBuilder().build();
       String reservationId = "reservationId1116965383";
       Reservation response =
           adminServiceClient.createReservation(parent, reservation, reservationId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent location in which to create the reservation. Structured like `projects/{project_number}/locations/{location}`. |
| `reservation` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` Required. Configuration of the reservation to create. Its `name` field is ignored. |
| `reservationId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the reservation, which will become the final component of the reservation's name. This value is structured like: `my-reservation-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### createReservation(String parent, Reservation reservation, String reservationId)

    public final Reservation createReservation(String parent, Reservation reservation, String reservationId)

Creates a new reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       Reservation reservation = Reservation.newBuilder().build();
       String reservationId = "reservationId1116965383";
       Reservation response =
           adminServiceClient.createReservation(parent, reservation, reservationId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent location in which to create the reservation. Structured like `projects/{project_number}/locations/{location}`. |
| `reservation` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` Required. Configuration of the reservation to create. Its `name` field is ignored. |
| `reservationId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the reservation, which will become the final component of the reservation's name. This value is structured like: `my-reservation-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### createReservationCallable()

    public final UnaryCallable<CreateReservationRequest,Reservation> createReservationCallable()

Creates a new reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateReservationRequest request =
           CreateReservationRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setReservation(Reservation.newBuilder().build())
               .setReservationId("reservationId1116965383")
               .build();
       ApiFuture<Reservation> future =
           adminServiceClient.createReservationCallable().futureCall(request);
       // Do something.
       Reservation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateReservationRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation>` |   |

### createSubscription(CreateSubscriptionRequest request)

    public final Subscription createSubscription(CreateSubscriptionRequest request)

Creates a new subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateSubscriptionRequest request =
           CreateSubscriptionRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setSubscription(Subscription.newBuilder().build())
               .setSubscriptionId("subscriptionId1478790936")
               .setSkipBacklog(true)
               .build();
       Subscription response = adminServiceClient.createSubscription(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateSubscriptionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### createSubscription(LocationName parent, Subscription subscription, String subscriptionId)

    public final Subscription createSubscription(LocationName parent, Subscription subscription, String subscriptionId)

Creates a new subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Subscription subscription = Subscription.newBuilder().build();
       String subscriptionId = "subscriptionId1478790936";
       Subscription response =
           adminServiceClient.createSubscription(parent, subscription, subscriptionId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent location in which to create the subscription. Structured like `projects/{project_number}/locations/{location}`. |
| `subscription` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` Required. Configuration of the subscription to create. Its `name` field is ignored. |
| `subscriptionId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### createSubscription(String parent, Subscription subscription, String subscriptionId)

    public final Subscription createSubscription(String parent, Subscription subscription, String subscriptionId)

Creates a new subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       Subscription subscription = Subscription.newBuilder().build();
       String subscriptionId = "subscriptionId1478790936";
       Subscription response =
           adminServiceClient.createSubscription(parent, subscription, subscriptionId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent location in which to create the subscription. Structured like `projects/{project_number}/locations/{location}`. |
| `subscription` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` Required. Configuration of the subscription to create. Its `name` field is ignored. |
| `subscriptionId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### createSubscriptionCallable()

    public final UnaryCallable<CreateSubscriptionRequest,Subscription> createSubscriptionCallable()

Creates a new subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateSubscriptionRequest request =
           CreateSubscriptionRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setSubscription(Subscription.newBuilder().build())
               .setSubscriptionId("subscriptionId1478790936")
               .setSkipBacklog(true)
               .build();
       ApiFuture<Subscription> future =
           adminServiceClient.createSubscriptionCallable().futureCall(request);
       // Do something.
       Subscription response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateSubscriptionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription>` |   |

### createTopic(CreateTopicRequest request)

    public final Topic createTopic(CreateTopicRequest request)

Creates a new topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateTopicRequest request =
           CreateTopicRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setTopic(Topic.newBuilder().build())
               .setTopicId("topicId-1139259734")
               .build();
       Topic response = adminServiceClient.createTopic(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateTopicRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### createTopic(LocationName parent, Topic topic, String topicId)

    public final Topic createTopic(LocationName parent, Topic topic, String topicId)

Creates a new topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Topic topic = Topic.newBuilder().build();
       String topicId = "topicId-1139259734";
       Topic response = adminServiceClient.createTopic(parent, topic, topicId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent location in which to create the topic. Structured like `projects/{project_number}/locations/{location}`. |
| `topic` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` Required. Configuration of the topic to create. Its `name` field is ignored. |
| `topicId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the topic, which will become the final component of the topic's name. This value is structured like: `my-topic-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### createTopic(String parent, Topic topic, String topicId)

    public final Topic createTopic(String parent, Topic topic, String topicId)

Creates a new topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       Topic topic = Topic.newBuilder().build();
       String topicId = "topicId-1139259734";
       Topic response = adminServiceClient.createTopic(parent, topic, topicId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent location in which to create the topic. Structured like `projects/{project_number}/locations/{location}`. |
| `topic` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` Required. Configuration of the topic to create. Its `name` field is ignored. |
| `topicId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The ID to use for the topic, which will become the final component of the topic's name. This value is structured like: `my-topic-name`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### createTopicCallable()

    public final UnaryCallable<CreateTopicRequest,Topic> createTopicCallable()

Creates a new topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       CreateTopicRequest request =
           CreateTopicRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setTopic(Topic.newBuilder().build())
               .setTopicId("topicId-1139259734")
               .build();
       ApiFuture<Topic> future = adminServiceClient.createTopicCallable().futureCall(request);
       // Do something.
       Topic response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.CreateTopicRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic>` |   |

### deleteReservation(DeleteReservationRequest request)

    public final void deleteReservation(DeleteReservationRequest request)

Deletes the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteReservationRequest request =
           DeleteReservationRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .build();
       adminServiceClient.deleteReservation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteReservationRequest` The request object containing all of the parameters for the API call. |

### deleteReservation(ReservationName name)

    public final void deleteReservation(ReservationName name)

Deletes the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ReservationName name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
       adminServiceClient.deleteReservation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ReservationName` Required. The name of the reservation to delete. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

### deleteReservation(String name)

    public final void deleteReservation(String name)

Deletes the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
       adminServiceClient.deleteReservation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the reservation to delete. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

### deleteReservationCallable()

    public final UnaryCallable<DeleteReservationRequest,Empty> deleteReservationCallable()

Deletes the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteReservationRequest request =
           DeleteReservationRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .build();
       ApiFuture<Empty> future = adminServiceClient.deleteReservationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteReservationRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### deleteSubscription(DeleteSubscriptionRequest request)

    public final void deleteSubscription(DeleteSubscriptionRequest request)

Deletes the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteSubscriptionRequest request =
           DeleteSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       adminServiceClient.deleteSubscription(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteSubscriptionRequest` The request object containing all of the parameters for the API call. |

### deleteSubscription(SubscriptionName name)

    public final void deleteSubscription(SubscriptionName name)

Deletes the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]");
       adminServiceClient.deleteSubscription(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SubscriptionName` Required. The name of the subscription to delete. |

### deleteSubscription(String name)

    public final void deleteSubscription(String name)

Deletes the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString();
       adminServiceClient.deleteSubscription(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the subscription to delete. |

### deleteSubscriptionCallable()

    public final UnaryCallable<DeleteSubscriptionRequest,Empty> deleteSubscriptionCallable()

Deletes the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteSubscriptionRequest request =
           DeleteSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       ApiFuture<Empty> future = adminServiceClient.deleteSubscriptionCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteSubscriptionRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### deleteTopic(DeleteTopicRequest request)

    public final void deleteTopic(DeleteTopicRequest request)

Deletes the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteTopicRequest request =
           DeleteTopicRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       adminServiceClient.deleteTopic(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteTopicRequest` The request object containing all of the parameters for the API call. |

### deleteTopic(TopicName name)

    public final void deleteTopic(TopicName name)

Deletes the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       TopicName name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]");
       adminServiceClient.deleteTopic(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicName` Required. The name of the topic to delete. |

### deleteTopic(String name)

    public final void deleteTopic(String name)

Deletes the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString();
       adminServiceClient.deleteTopic(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the topic to delete. |

### deleteTopicCallable()

    public final UnaryCallable<DeleteTopicRequest,Empty> deleteTopicCallable()

Deletes the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       DeleteTopicRequest request =
           DeleteTopicRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       ApiFuture<Empty> future = adminServiceClient.deleteTopicCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.DeleteTopicRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getOperationsClient()

    public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.OperationsClient.html` |   |

### getReservation(GetReservationRequest request)

    public final Reservation getReservation(GetReservationRequest request)

Returns the reservation configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetReservationRequest request =
           GetReservationRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .build();
       Reservation response = adminServiceClient.getReservation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetReservationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### getReservation(ReservationName name)

    public final Reservation getReservation(ReservationName name)

Returns the reservation configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ReservationName name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
       Reservation response = adminServiceClient.getReservation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ReservationName` Required. The name of the reservation whose configuration to return. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### getReservation(String name)

    public final Reservation getReservation(String name)

Returns the reservation configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
       Reservation response = adminServiceClient.getReservation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the reservation whose configuration to return. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### getReservationCallable()

    public final UnaryCallable<GetReservationRequest,Reservation> getReservationCallable()

Returns the reservation configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetReservationRequest request =
           GetReservationRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .build();
       ApiFuture<Reservation> future =
           adminServiceClient.getReservationCallable().futureCall(request);
       // Do something.
       Reservation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetReservationRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation>` |   |

### getSettings()

    public final AdminServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceSettings` |   |

### getStub()

    public AdminServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.stub.AdminServiceStub` |   |

### getSubscription(GetSubscriptionRequest request)

    public final Subscription getSubscription(GetSubscriptionRequest request)

Returns the subscription configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetSubscriptionRequest request =
           GetSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       Subscription response = adminServiceClient.getSubscription(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetSubscriptionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### getSubscription(SubscriptionName name)

    public final Subscription getSubscription(SubscriptionName name)

Returns the subscription configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]");
       Subscription response = adminServiceClient.getSubscription(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SubscriptionName` Required. The name of the subscription whose configuration to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### getSubscription(String name)

    public final Subscription getSubscription(String name)

Returns the subscription configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString();
       Subscription response = adminServiceClient.getSubscription(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the subscription whose configuration to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### getSubscriptionCallable()

    public final UnaryCallable<GetSubscriptionRequest,Subscription> getSubscriptionCallable()

Returns the subscription configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetSubscriptionRequest request =
           GetSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       ApiFuture<Subscription> future =
           adminServiceClient.getSubscriptionCallable().futureCall(request);
       // Do something.
       Subscription response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetSubscriptionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription>` |   |

### getTopic(GetTopicRequest request)

    public final Topic getTopic(GetTopicRequest request)

Returns the topic configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetTopicRequest request =
           GetTopicRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       Topic response = adminServiceClient.getTopic(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetTopicRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### getTopic(TopicName name)

    public final Topic getTopic(TopicName name)

Returns the topic configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       TopicName name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]");
       Topic response = adminServiceClient.getTopic(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicName` Required. The name of the topic whose configuration to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### getTopic(String name)

    public final Topic getTopic(String name)

Returns the topic configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString();
       Topic response = adminServiceClient.getTopic(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the topic whose configuration to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### getTopicCallable()

    public final UnaryCallable<GetTopicRequest,Topic> getTopicCallable()

Returns the topic configuration.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetTopicRequest request =
           GetTopicRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       ApiFuture<Topic> future = adminServiceClient.getTopicCallable().futureCall(request);
       // Do something.
       Topic response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetTopicRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic>` |   |

### getTopicPartitions(GetTopicPartitionsRequest request)

    public final TopicPartitions getTopicPartitions(GetTopicPartitionsRequest request)

Returns the partition information for the requested topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetTopicPartitionsRequest request =
           GetTopicPartitionsRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       TopicPartitions response = adminServiceClient.getTopicPartitions(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetTopicPartitionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicPartitions` |   |

### getTopicPartitions(TopicName name)

    public final TopicPartitions getTopicPartitions(TopicName name)

Returns the partition information for the requested topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       TopicName name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]");
       TopicPartitions response = adminServiceClient.getTopicPartitions(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicName` Required. The topic whose partition information to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicPartitions` |   |

### getTopicPartitions(String name)

    public final TopicPartitions getTopicPartitions(String name)

Returns the partition information for the requested topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString();
       TopicPartitions response = adminServiceClient.getTopicPartitions(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The topic whose partition information to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicPartitions` |   |

### getTopicPartitionsCallable()

    public final UnaryCallable<GetTopicPartitionsRequest,TopicPartitions> getTopicPartitionsCallable()

Returns the partition information for the requested topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       GetTopicPartitionsRequest request =
           GetTopicPartitionsRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .build();
       ApiFuture<TopicPartitions> future =
           adminServiceClient.getTopicPartitionsCallable().futureCall(request);
       // Do something.
       TopicPartitions response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.GetTopicPartitionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicPartitions>` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listReservationTopics(ListReservationTopicsRequest request)

    public final AdminServiceClient.ListReservationTopicsPagedResponse listReservationTopics(ListReservationTopicsRequest request)

Lists the topics attached to the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationTopicsRequest request =
           ListReservationTopicsRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (String element : adminServiceClient.listReservationTopics(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationTopicsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationTopicsPagedResponse` |   |

### listReservationTopics(ReservationName name)

    public final AdminServiceClient.ListReservationTopicsPagedResponse listReservationTopics(ReservationName name)

Lists the topics attached to the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ReservationName name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
       for (String element : adminServiceClient.listReservationTopics(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ReservationName` Required. The name of the reservation whose topics to list. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationTopicsPagedResponse` |   |

### listReservationTopics(String name)

    public final AdminServiceClient.ListReservationTopicsPagedResponse listReservationTopics(String name)

Lists the topics attached to the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
       for (String element : adminServiceClient.listReservationTopics(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the reservation whose topics to list. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id} |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationTopicsPagedResponse` |   |

### listReservationTopicsCallable()

    public final UnaryCallable<ListReservationTopicsRequest,ListReservationTopicsResponse> listReservationTopicsCallable()

Lists the topics attached to the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationTopicsRequest request =
           ListReservationTopicsRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListReservationTopicsResponse response =
             adminServiceClient.listReservationTopicsCallable().call(request);
         for (String element : response.getTopicsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationTopicsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationTopicsResponse>` |   |

### listReservationTopicsPagedCallable()

    public final UnaryCallable<ListReservationTopicsRequest,AdminServiceClient.ListReservationTopicsPagedResponse> listReservationTopicsPagedCallable()

Lists the topics attached to the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationTopicsRequest request =
           ListReservationTopicsRequest.newBuilder()
               .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<String> future =
           adminServiceClient.listReservationTopicsPagedCallable().futureCall(request);
       // Do something.
       for (String element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationTopicsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationTopicsPagedResponse>` |   |

### listReservations(ListReservationsRequest request)

    public final AdminServiceClient.ListReservationsPagedResponse listReservations(ListReservationsRequest request)

Returns the list of reservations for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationsRequest request =
           ListReservationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Reservation element : adminServiceClient.listReservations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationsPagedResponse` |   |

### listReservations(LocationName parent)

    public final AdminServiceClient.ListReservationsPagedResponse listReservations(LocationName parent)

Returns the list of reservations for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Reservation element : adminServiceClient.listReservations(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent whose reservations are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationsPagedResponse` |   |

### listReservations(String parent)

    public final AdminServiceClient.ListReservationsPagedResponse listReservations(String parent)

Returns the list of reservations for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Reservation element : adminServiceClient.listReservations(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent whose reservations are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationsPagedResponse` |   |

### listReservationsCallable()

    public final UnaryCallable<ListReservationsRequest,ListReservationsResponse> listReservationsCallable()

Returns the list of reservations for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationsRequest request =
           ListReservationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListReservationsResponse response =
             adminServiceClient.listReservationsCallable().call(request);
         for (Reservation element : response.getReservationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationsResponse>` |   |

### listReservationsPagedCallable()

    public final UnaryCallable<ListReservationsRequest,AdminServiceClient.ListReservationsPagedResponse> listReservationsPagedCallable()

Returns the list of reservations for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListReservationsRequest request =
           ListReservationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Reservation> future =
           adminServiceClient.listReservationsPagedCallable().futureCall(request);
       // Do something.
       for (Reservation element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListReservationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListReservationsPagedResponse>` |   |

### listSubscriptions(ListSubscriptionsRequest request)

    public final AdminServiceClient.ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request)

Returns the list of subscriptions for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListSubscriptionsRequest request =
           ListSubscriptionsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Subscription element : adminServiceClient.listSubscriptions(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListSubscriptionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListSubscriptionsPagedResponse` |   |

### listSubscriptions(LocationName parent)

    public final AdminServiceClient.ListSubscriptionsPagedResponse listSubscriptions(LocationName parent)

Returns the list of subscriptions for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Subscription element : adminServiceClient.listSubscriptions(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent whose subscriptions are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListSubscriptionsPagedResponse` |   |

### listSubscriptions(String parent)

    public final AdminServiceClient.ListSubscriptionsPagedResponse listSubscriptions(String parent)

Returns the list of subscriptions for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Subscription element : adminServiceClient.listSubscriptions(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent whose subscriptions are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListSubscriptionsPagedResponse` |   |

### listSubscriptionsCallable()

    public final UnaryCallable<ListSubscriptionsRequest,ListSubscriptionsResponse> listSubscriptionsCallable()

Returns the list of subscriptions for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListSubscriptionsRequest request =
           ListSubscriptionsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListSubscriptionsResponse response =
             adminServiceClient.listSubscriptionsCallable().call(request);
         for (Subscription element : response.getSubscriptionsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListSubscriptionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListSubscriptionsResponse>` |   |

### listSubscriptionsPagedCallable()

    public final UnaryCallable<ListSubscriptionsRequest,AdminServiceClient.ListSubscriptionsPagedResponse> listSubscriptionsPagedCallable()

Returns the list of subscriptions for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListSubscriptionsRequest request =
           ListSubscriptionsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Subscription> future =
           adminServiceClient.listSubscriptionsPagedCallable().futureCall(request);
       // Do something.
       for (Subscription element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListSubscriptionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListSubscriptionsPagedResponse>` |   |

### listTopicSubscriptions(ListTopicSubscriptionsRequest request)

    public final AdminServiceClient.ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ListTopicSubscriptionsRequest request)

Lists the subscriptions attached to the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicSubscriptionsRequest request =
           ListTopicSubscriptionsRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (String element : adminServiceClient.listTopicSubscriptions(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicSubscriptionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicSubscriptionsPagedResponse` |   |

### listTopicSubscriptions(TopicName name)

    public final AdminServiceClient.ListTopicSubscriptionsPagedResponse listTopicSubscriptions(TopicName name)

Lists the subscriptions attached to the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       TopicName name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]");
       for (String element : adminServiceClient.listTopicSubscriptions(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.TopicName` Required. The name of the topic whose subscriptions to list. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicSubscriptionsPagedResponse` |   |

### listTopicSubscriptions(String name)

    public final AdminServiceClient.ListTopicSubscriptionsPagedResponse listTopicSubscriptions(String name)

Lists the subscriptions attached to the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String name = TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString();
       for (String element : adminServiceClient.listTopicSubscriptions(name).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the topic whose subscriptions to list. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicSubscriptionsPagedResponse` |   |

### listTopicSubscriptionsCallable()

    public final UnaryCallable<ListTopicSubscriptionsRequest,ListTopicSubscriptionsResponse> listTopicSubscriptionsCallable()

Lists the subscriptions attached to the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicSubscriptionsRequest request =
           ListTopicSubscriptionsRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListTopicSubscriptionsResponse response =
             adminServiceClient.listTopicSubscriptionsCallable().call(request);
         for (String element : response.getSubscriptionsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicSubscriptionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicSubscriptionsResponse>` |   |

### listTopicSubscriptionsPagedCallable()

    public final UnaryCallable<ListTopicSubscriptionsRequest,AdminServiceClient.ListTopicSubscriptionsPagedResponse> listTopicSubscriptionsPagedCallable()

Lists the subscriptions attached to the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicSubscriptionsRequest request =
           ListTopicSubscriptionsRequest.newBuilder()
               .setName(TopicName.of("[PROJECT]", "[LOCATION]", "[TOPIC]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<String> future =
           adminServiceClient.listTopicSubscriptionsPagedCallable().futureCall(request);
       // Do something.
       for (String element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicSubscriptionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicSubscriptionsPagedResponse>` |   |

### listTopics(ListTopicsRequest request)

    public final AdminServiceClient.ListTopicsPagedResponse listTopics(ListTopicsRequest request)

Returns the list of topics for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicsRequest request =
           ListTopicsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Topic element : adminServiceClient.listTopics(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicsPagedResponse` |   |

### listTopics(LocationName parent)

    public final AdminServiceClient.ListTopicsPagedResponse listTopics(LocationName parent)

Returns the list of topics for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Topic element : adminServiceClient.listTopics(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.LocationName` Required. The parent whose topics are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicsPagedResponse` |   |

### listTopics(String parent)

    public final AdminServiceClient.ListTopicsPagedResponse listTopics(String parent)

Returns the list of topics for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Topic element : adminServiceClient.listTopics(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent whose topics are to be listed. Structured like `projects/{project_number}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicsPagedResponse` |   |

### listTopicsCallable()

    public final UnaryCallable<ListTopicsRequest,ListTopicsResponse> listTopicsCallable()

Returns the list of topics for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicsRequest request =
           ListTopicsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListTopicsResponse response = adminServiceClient.listTopicsCallable().call(request);
         for (Topic element : response.getTopicsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicsResponse>` |   |

### listTopicsPagedCallable()

    public final UnaryCallable<ListTopicsRequest,AdminServiceClient.ListTopicsPagedResponse> listTopicsPagedCallable()

Returns the list of topics for the given project.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       ListTopicsRequest request =
           ListTopicsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Topic> future = adminServiceClient.listTopicsPagedCallable().futureCall(request);
       // Do something.
       for (Topic element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.ListTopicsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.v1.AdminServiceClient.ListTopicsPagedResponse>` |   |

### seekSubscriptionAsync(SeekSubscriptionRequest request)

    public final OperationFuture<SeekSubscriptionResponse,OperationMetadata> seekSubscriptionAsync(SeekSubscriptionRequest request)

Performs an out-of-band seek for a subscription to a specified target, which may be timestamps
or named positions within the message backlog. Seek translates these targets to cursors for
each partition and orchestrates subscribers to start consuming messages from these seek
cursors.

If an operation is returned, the seek has been registered and subscribers will eventually
receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a
minimum supported client library version and not a system that tracks cursors independently of
Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported
clients.

If clients would like to know when subscribers react to the seek (or not), they can poll the
operation. The seek operation will succeed and complete once subscribers are ready to receive
messages from the seek cursors for all partitions of the topic. This means that the seek
operation will not complete until all subscribers come online.

If the previous seek operation has not yet completed, it will be aborted and the new
invocation of seek will supersede it.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       SeekSubscriptionRequest request =
           SeekSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       SeekSubscriptionResponse response = adminServiceClient.seekSubscriptionAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SeekSubscriptionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SeekSubscriptionResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.OperationMetadata>` |   |

### seekSubscriptionCallable()

    public final UnaryCallable<SeekSubscriptionRequest,Operation> seekSubscriptionCallable()

Performs an out-of-band seek for a subscription to a specified target, which may be timestamps
or named positions within the message backlog. Seek translates these targets to cursors for
each partition and orchestrates subscribers to start consuming messages from these seek
cursors.

If an operation is returned, the seek has been registered and subscribers will eventually
receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a
minimum supported client library version and not a system that tracks cursors independently of
Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported
clients.

If clients would like to know when subscribers react to the seek (or not), they can poll the
operation. The seek operation will succeed and complete once subscribers are ready to receive
messages from the seek cursors for all partitions of the topic. This means that the seek
operation will not complete until all subscribers come online.

If the previous seek operation has not yet completed, it will be aborted and the new
invocation of seek will supersede it.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       SeekSubscriptionRequest request =
           SeekSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       ApiFuture<Operation> future =
           adminServiceClient.seekSubscriptionCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SeekSubscriptionRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### seekSubscriptionOperationCallable()

    public final OperationCallable<SeekSubscriptionRequest,SeekSubscriptionResponse,OperationMetadata> seekSubscriptionOperationCallable()

Performs an out-of-band seek for a subscription to a specified target, which may be timestamps
or named positions within the message backlog. Seek translates these targets to cursors for
each partition and orchestrates subscribers to start consuming messages from these seek
cursors.

If an operation is returned, the seek has been registered and subscribers will eventually
receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a
minimum supported client library version and not a system that tracks cursors independently of
Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported
clients.

If clients would like to know when subscribers react to the seek (or not), they can poll the
operation. The seek operation will succeed and complete once subscribers are ready to receive
messages from the seek cursors for all partitions of the topic. This means that the seek
operation will not complete until all subscribers come online.

If the previous seek operation has not yet completed, it will be aborted and the new
invocation of seek will supersede it.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       SeekSubscriptionRequest request =
           SeekSubscriptionRequest.newBuilder()
               .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString())
               .build();
       OperationFuture<SeekSubscriptionResponse, OperationMetadata> future =
           adminServiceClient.seekSubscriptionOperationCallable().futureCall(request);
       // Do something.
       SeekSubscriptionResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SeekSubscriptionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.SeekSubscriptionResponse,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.OperationMetadata>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateReservation(Reservation reservation, FieldMask updateMask)

    public final Reservation updateReservation(Reservation reservation, FieldMask updateMask)

Updates properties of the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       Reservation reservation = Reservation.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       Reservation response = adminServiceClient.updateReservation(reservation, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `reservation` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` Required. The reservation to update. Its `name` field must be populated. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Required. A mask specifying the reservation fields to change. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### updateReservation(UpdateReservationRequest request)

    public final Reservation updateReservation(UpdateReservationRequest request)

Updates properties of the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateReservationRequest request =
           UpdateReservationRequest.newBuilder()
               .setReservation(Reservation.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Reservation response = adminServiceClient.updateReservation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateReservationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation` |   |

### updateReservationCallable()

    public final UnaryCallable<UpdateReservationRequest,Reservation> updateReservationCallable()

Updates properties of the specified reservation.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateReservationRequest request =
           UpdateReservationRequest.newBuilder()
               .setReservation(Reservation.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Reservation> future =
           adminServiceClient.updateReservationCallable().futureCall(request);
       // Do something.
       Reservation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateReservationRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Reservation>` |   |

### updateSubscription(Subscription subscription, FieldMask updateMask)

    public final Subscription updateSubscription(Subscription subscription, FieldMask updateMask)

Updates properties of the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       Subscription subscription = Subscription.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       Subscription response = adminServiceClient.updateSubscription(subscription, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `subscription` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` Required. The subscription to update. Its `name` field must be populated. Topic field must not be populated. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Required. A mask specifying the subscription fields to change. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### updateSubscription(UpdateSubscriptionRequest request)

    public final Subscription updateSubscription(UpdateSubscriptionRequest request)

Updates properties of the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateSubscriptionRequest request =
           UpdateSubscriptionRequest.newBuilder()
               .setSubscription(Subscription.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Subscription response = adminServiceClient.updateSubscription(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateSubscriptionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription` |   |

### updateSubscriptionCallable()

    public final UnaryCallable<UpdateSubscriptionRequest,Subscription> updateSubscriptionCallable()

Updates properties of the specified subscription.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateSubscriptionRequest request =
           UpdateSubscriptionRequest.newBuilder()
               .setSubscription(Subscription.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Subscription> future =
           adminServiceClient.updateSubscriptionCallable().futureCall(request);
       // Do something.
       Subscription response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateSubscriptionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Subscription>` |   |

### updateTopic(Topic topic, FieldMask updateMask)

    public final Topic updateTopic(Topic topic, FieldMask updateMask)

Updates properties of the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       Topic topic = Topic.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       Topic response = adminServiceClient.updateTopic(topic, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `topic` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` Required. The topic to update. Its `name` field must be populated. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Required. A mask specifying the topic fields to change. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### updateTopic(UpdateTopicRequest request)

    public final Topic updateTopic(UpdateTopicRequest request)

Updates properties of the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateTopicRequest request =
           UpdateTopicRequest.newBuilder()
               .setTopic(Topic.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Topic response = adminServiceClient.updateTopic(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateTopicRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic` |   |

### updateTopicCallable()

    public final UnaryCallable<UpdateTopicRequest,Topic> updateTopicCallable()

Updates properties of the specified topic.

Sample 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 (AdminServiceClient adminServiceClient = AdminServiceClient.create()) {
       UpdateTopicRequest request =
           UpdateTopicRequest.newBuilder()
               .setTopic(Topic.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Topic> future = adminServiceClient.updateTopicCallable().futureCall(request);
       // Do something.
       Topic response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.UpdateTopicRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic>` |   |