1717package com .google .cloud .pubsublite ;
1818
1919import com .google .api .core .ApiFuture ;
20+ import com .google .api .gax .rpc .ApiException ;
2021import com .google .cloud .pubsublite .internal .ApiBackgroundResource ;
2122import com .google .cloud .pubsublite .proto .Subscription ;
2223import com .google .cloud .pubsublite .proto .Topic ;
2324import com .google .protobuf .FieldMask ;
24- import io .grpc .StatusException ;
2525import java .util .List ;
2626
2727/** A client for performing Pub/Sub Lite admin operations. */
2828public interface AdminClient extends ApiBackgroundResource {
29- static AdminClient create (AdminClientSettings settings ) throws StatusException {
29+ static AdminClient create (AdminClientSettings settings ) throws ApiException {
3030 return settings .instantiate ();
3131 }
3232
@@ -37,35 +37,35 @@ static AdminClient create(AdminClientSettings settings) throws StatusException {
3737 * Create the provided topic if it does not yet exist.
3838 *
3939 * @param topic The topic to create.
40- * @return A future that will have either an error {@link io.grpc.StatusException } or the topic on
41- * success.
40+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
41+ * the topic on success.
4242 */
4343 ApiFuture <Topic > createTopic (Topic topic );
4444
4545 /**
4646 * Get the topic with id {@code id} if it exists.
4747 *
4848 * @param path The path of the topic to retrieve.
49- * @return A future that will have either an error {@link io.grpc.StatusException } or the topic on
50- * success.
49+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
50+ * the topic on success.
5151 */
5252 ApiFuture <Topic > getTopic (TopicPath path );
5353
5454 /**
5555 * Get the partitioning info for the topic with id {@code id} if it exists.
5656 *
5757 * @param path The path of the topic to retrieve.
58- * @return A future that will have either an error {@link io.grpc.StatusException } or the number
59- * of topic partitions on success.
58+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
59+ * the number of topic partitions on success.
6060 */
6161 ApiFuture <Long > getTopicPartitionCount (TopicPath path );
6262
6363 /**
6464 * List all topics for the specified project.
6565 *
6666 * @param path The path of the project to list topics for.
67- * @return A future that will have either an error {@link io.grpc.StatusException } or the list of
68- * topic paths on success.
67+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
68+ * the list of topic paths on success.
6969 */
7070 ApiFuture <List <Topic >> listTopics (LocationPath path );
7171
@@ -74,55 +74,55 @@ static AdminClient create(AdminClientSettings settings) throws StatusException {
7474 *
7575 * @param topic The topic to update.
7676 * @param mask The mask indicating which fields should be updated.
77- * @return A future that will have either an error {@link io.grpc.StatusException } or the
78- * resulting topic on success. Updating nonexistent topics will cause the future to have an
79- * exception with status {@link io.grpc.Status .Code#NOT_FOUND}
77+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
78+ * the resulting topic on success. Updating nonexistent topics will cause the future to have
79+ * an exception with status {@link com.google.api.gax.rpc.StatusCode .Code#NOT_FOUND}
8080 */
8181 ApiFuture <Topic > updateTopic (Topic topic , FieldMask mask );
8282
8383 /**
8484 * Delete the topic with id {@code id} if it exists.
8585 *
8686 * @param path The path of the topic to retrieve.
87- * @return A future that will have either an error {@link io.grpc.StatusException } or void on
88- * success. Deleting nonexistent topics will cause the future to have an exception with status
89- * {@link io.grpc.Status .Code#NOT_FOUND}
87+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
88+ * void on success. Deleting nonexistent topics will cause the future to have an exception
89+ * with status {@link com.google.api.gax.rpc.StatusCode .Code#NOT_FOUND}
9090 */
9191 ApiFuture <Void > deleteTopic (TopicPath path );
9292
9393 /**
9494 * Get the list of subscriptions for the topic with id {@code id} if it exists.
9595 *
9696 * @param path The path of the topic to retrieve.
97- * @return A future that will have either an error {@link io.grpc.StatusException } or the list of
98- * subscriptions on success.
97+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
98+ * the list of subscriptions on success.
9999 */
100100 ApiFuture <List <SubscriptionPath >> listTopicSubscriptions (TopicPath path );
101101
102102 /**
103103 * Create the provided subscription if it does not yet exist.
104104 *
105105 * @param subscription The subscription to create.
106- * @return A future that will have either an error {@link io.grpc.StatusException } or the
107- * subscription on success.
106+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
107+ * the subscription on success.
108108 */
109109 ApiFuture <Subscription > createSubscription (Subscription subscription );
110110
111111 /**
112112 * Get the subscription with id {@code id} if it exists.
113113 *
114114 * @param path The path of the subscription to retrieve.
115- * @return A future that will have either an error {@link io.grpc.StatusException } or the
116- * subscription on success.
115+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
116+ * the subscription on success.
117117 */
118118 ApiFuture <Subscription > getSubscription (SubscriptionPath path );
119119
120120 /**
121121 * List all subscriptions for the specified project.
122122 *
123123 * @param path The path of the project to list subscriptions for.
124- * @return A future that will have either an error {@link io.grpc.StatusException } or the list of
125- * subscription paths on success.
124+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
125+ * the list of subscription paths on success.
126126 */
127127 ApiFuture <List <Subscription >> listSubscriptions (LocationPath path );
128128
@@ -131,19 +131,20 @@ static AdminClient create(AdminClientSettings settings) throws StatusException {
131131 *
132132 * @param subscription The subscription to update.
133133 * @param mask The mask indicating which fields should be updated.
134- * @return A future that will have either an error {@link io.grpc.StatusException} or the
135- * resulting subscription on success. Updating nonexistent subscriptions will cause the future
136- * to have an exception with status {@link io.grpc.Status.Code#NOT_FOUND}
134+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException} or
135+ * the resulting subscription on success. Updating nonexistent subscriptions will cause the
136+ * future to have an exception with status {@link
137+ * com.google.api.gax.rpc.StatusCode.Code#NOT_FOUND}
137138 */
138139 ApiFuture <Subscription > updateSubscription (Subscription subscription , FieldMask mask );
139140
140141 /**
141142 * Delete the subscription with id {@code id} if it exists.
142143 *
143144 * @param path The path of the subscription to retrieve.
144- * @return A future that will have either an error {@link io.grpc.StatusException } or void on
145- * success. Deleting nonexistent subscriptions will cause the future to have an exception with
146- * status {@link io.grpc.Status .Code#NOT_FOUND}
145+ * @return A future that will have either an error {@link com.google.api.gax.rpc.ApiException } or
146+ * void on success. Deleting nonexistent subscriptions will cause the future to have an
147+ * exception with status {@link com.google.api.gax.rpc.StatusCode .Code#NOT_FOUND}
147148 */
148149 ApiFuture <Void > deleteSubscription (SubscriptionPath path );
149150}
0 commit comments