Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 5be66cd

Browse files
authored
fix(operations): Make Operations a manual client [gax-java] (#1282)
* fix(operations): Make Operations a manual client * fix: remove autogen annotations from tests * fix: remove client and settings classes' beta annotations * fix: apply googleJavaFormat
1 parent 95a7dab commit 5be66cd

7 files changed

Lines changed: 0 additions & 34 deletions

File tree

gax-grpc/src/main/java/com/google/longrunning/OperationsClient.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
import java.io.IOException;
4848
import java.util.List;
4949
import java.util.concurrent.TimeUnit;
50-
import javax.annotation.Generated;
5150

52-
// AUTO-GENERATED DOCUMENTATION AND SERVICE
5351
/**
5452
* Service Description: Manages long-running operations with an API service.
5553
*
@@ -111,8 +109,6 @@
111109
* </code>
112110
* </pre>
113111
*/
114-
@Generated("by GAPIC v0.0.5")
115-
@BetaApi
116112
public class OperationsClient implements BackgroundResource {
117113
private final OperationsSettings settings;
118114
private final OperationsStub stub;
@@ -158,7 +154,6 @@ public OperationsStub getStub() {
158154
return stub;
159155
}
160156

161-
// AUTO-GENERATED DOCUMENTATION AND METHOD
162157
/**
163158
* Gets the latest state of a long-running operation. Clients can use this method to poll the
164159
* operation result at intervals as recommended by the API service.
@@ -181,7 +176,6 @@ public final Operation getOperation(String name) {
181176
return getOperation(request);
182177
}
183178

184-
// AUTO-GENERATED DOCUMENTATION AND METHOD
185179
/**
186180
* Gets the latest state of a long-running operation. Clients can use this method to poll the
187181
* operation result at intervals as recommended by the API service.
@@ -205,7 +199,6 @@ private final Operation getOperation(GetOperationRequest request) {
205199
return getOperationCallable().call(request);
206200
}
207201

208-
// AUTO-GENERATED DOCUMENTATION AND METHOD
209202
/**
210203
* Gets the latest state of a long-running operation. Clients can use this method to poll the
211204
* operation result at intervals as recommended by the API service.
@@ -228,7 +221,6 @@ public final UnaryCallable<GetOperationRequest, Operation> getOperationCallable(
228221
return stub.getOperationCallable();
229222
}
230223

231-
// AUTO-GENERATED DOCUMENTATION AND METHOD
232224
/**
233225
* Lists operations that match the specified filter in the request. If the server doesn't support
234226
* this method, it returns `UNIMPLEMENTED`.
@@ -258,7 +250,6 @@ public final ListOperationsPagedResponse listOperations(String name, String filt
258250
return listOperations(request);
259251
}
260252

261-
// AUTO-GENERATED DOCUMENTATION AND METHOD
262253
/**
263254
* Lists operations that match the specified filter in the request. If the server doesn't support
264255
* this method, it returns `UNIMPLEMENTED`.
@@ -289,7 +280,6 @@ public final ListOperationsPagedResponse listOperations(ListOperationsRequest re
289280
return listOperationsPagedCallable().call(request);
290281
}
291282

292-
// AUTO-GENERATED DOCUMENTATION AND METHOD
293283
/**
294284
* Lists operations that match the specified filter in the request. If the server doesn't support
295285
* this method, it returns `UNIMPLEMENTED`.
@@ -320,7 +310,6 @@ public final ListOperationsPagedResponse listOperations(ListOperationsRequest re
320310
return stub.listOperationsPagedCallable();
321311
}
322312

323-
// AUTO-GENERATED DOCUMENTATION AND METHOD
324313
/**
325314
* Lists operations that match the specified filter in the request. If the server doesn't support
326315
* this method, it returns `UNIMPLEMENTED`.
@@ -358,7 +347,6 @@ public final ListOperationsPagedResponse listOperations(ListOperationsRequest re
358347
return stub.listOperationsCallable();
359348
}
360349

361-
// AUTO-GENERATED DOCUMENTATION AND METHOD
362350
/**
363351
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
364352
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
@@ -387,7 +375,6 @@ public final void cancelOperation(String name) {
387375
cancelOperation(request);
388376
}
389377

390-
// AUTO-GENERATED DOCUMENTATION AND METHOD
391378
/**
392379
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
393380
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
@@ -417,7 +404,6 @@ private final void cancelOperation(CancelOperationRequest request) {
417404
cancelOperationCallable().call(request);
418405
}
419406

420-
// AUTO-GENERATED DOCUMENTATION AND METHOD
421407
/**
422408
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
423409
* cancel the operation, but success is not guaranteed. If the server doesn't support this method,
@@ -446,7 +432,6 @@ public final UnaryCallable<CancelOperationRequest, Empty> cancelOperationCallabl
446432
return stub.cancelOperationCallable();
447433
}
448434

449-
// AUTO-GENERATED DOCUMENTATION AND METHOD
450435
/**
451436
* Deletes a long-running operation. This method indicates that the client is no longer interested
452437
* in the operation result. It does not cancel the operation. If the server doesn't support this
@@ -470,7 +455,6 @@ public final void deleteOperation(String name) {
470455
deleteOperation(request);
471456
}
472457

473-
// AUTO-GENERATED DOCUMENTATION AND METHOD
474458
/**
475459
* Deletes a long-running operation. This method indicates that the client is no longer interested
476460
* in the operation result. It does not cancel the operation. If the server doesn't support this
@@ -495,7 +479,6 @@ private final void deleteOperation(DeleteOperationRequest request) {
495479
deleteOperationCallable().call(request);
496480
}
497481

498-
// AUTO-GENERATED DOCUMENTATION AND METHOD
499482
/**
500483
* Deletes a long-running operation. This method indicates that the client is no longer interested
501484
* in the operation result. It does not cancel the operation. If the server doesn't support this

gax-grpc/src/main/java/com/google/longrunning/OperationsSettings.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@
4343
import com.google.longrunning.stub.OperationsStubSettings;
4444
import com.google.protobuf.Empty;
4545
import java.io.IOException;
46-
import javax.annotation.Generated;
4746

48-
// AUTO-GENERATED DOCUMENTATION AND CLASS
4947
/** Settings class to configure an instance of {@link OperationsClient}. */
50-
@Generated("by GAPIC v0.0.5")
51-
@BetaApi
5248
public class OperationsSettings extends ClientSettings<OperationsSettings> {
5349
/** Returns the object with the settings used for calls to getOperation. */
5450
public UnaryCallSettings<GetOperationRequest, Operation> getOperationSettings() {

gax-grpc/src/main/java/com/google/longrunning/stub/GrpcOperationsCallableFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,12 @@
4646
import com.google.api.gax.rpc.UnaryCallSettings;
4747
import com.google.api.gax.rpc.UnaryCallable;
4848
import com.google.longrunning.Operation;
49-
import javax.annotation.Generated;
5049

51-
// AUTO-GENERATED DOCUMENTATION AND CLASS
5250
/**
5351
* gRPC callable factory implementation for Google Long Running Operations API.
5452
*
5553
* <p>This class is for advanced usage.
5654
*/
57-
@Generated("by GAPIC v0.0.5")
5855
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
5956
public class GrpcOperationsCallableFactory implements GrpcStubCallableFactory {
6057
@Override

gax-grpc/src/main/java/com/google/longrunning/stub/GrpcOperationsStub.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,12 @@
4949
import io.grpc.protobuf.ProtoUtils;
5050
import java.io.IOException;
5151
import java.util.concurrent.TimeUnit;
52-
import javax.annotation.Generated;
5352

54-
// AUTO-GENERATED DOCUMENTATION AND CLASS
5553
/**
5654
* gRPC stub implementation for Google Long Running Operations API.
5755
*
5856
* <p>This class is for advanced usage and reflects the underlying API directly.
5957
*/
60-
@Generated("by GAPIC v0.0.5")
6158
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
6259
public class GrpcOperationsStub extends OperationsStub {
6360

gax-grpc/src/main/java/com/google/longrunning/stub/OperationsStub.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@
4141
import com.google.longrunning.ListOperationsResponse;
4242
import com.google.longrunning.Operation;
4343
import com.google.protobuf.Empty;
44-
import javax.annotation.Generated;
4544

46-
// AUTO-GENERATED DOCUMENTATION AND CLASS
4745
/**
4846
* Base stub class for Google Long Running Operations API.
4947
*
5048
* <p>This class is for advanced usage and reflects the underlying API directly.
5149
*/
52-
@Generated("by GAPIC v0.0.5")
5350
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
5451
public abstract class OperationsStub implements BackgroundResource {
5552

gax-grpc/src/main/java/com/google/longrunning/stub/OperationsStubSettings.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@
6363
import com.google.longrunning.Operation;
6464
import com.google.protobuf.Empty;
6565
import java.io.IOException;
66-
import javax.annotation.Generated;
6766
import org.threeten.bp.Duration;
6867

69-
// AUTO-GENERATED DOCUMENTATION AND CLASS
7068
/** Settings class to configure an instance of {@link OperationsStub}. */
71-
@Generated("by GAPIC v0.0.5")
7269
@BetaApi
7370
public class OperationsStubSettings extends StubSettings<OperationsStubSettings> {
7471

gax-grpc/src/test/java/com/google/longrunning/OperationsClientTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import org.junit.BeforeClass;
5252
import org.junit.Test;
5353

54-
@javax.annotation.Generated("by GAPIC")
5554
public class OperationsClientTest {
5655
private static MockOperations mockOperations;
5756
private static MockServiceHelper serviceHelper;

0 commit comments

Comments
 (0)