Skip to content
Permalink
Browse files
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
  • Loading branch information
miraleung committed Feb 2, 2021
1 parent 95a7dab commit 5be66cd3ebf2ccf34f21db40463a2d9115a77798
@@ -47,9 +47,7 @@
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: Manages long-running operations with an API service.
*
@@ -111,8 +109,6 @@
* </code>
* </pre>
*/
@Generated("by GAPIC v0.0.5")
@BetaApi
public class OperationsClient implements BackgroundResource {
private final OperationsSettings settings;
private final OperationsStub stub;
@@ -158,7 +154,6 @@ public OperationsStub getStub() {
return stub;
}

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

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

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

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

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

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

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

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* 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) {
cancelOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* 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) {
cancelOperationCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to
* 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
return stub.cancelOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* 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) {
deleteOperation(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* 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) {
deleteOperationCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a long-running operation. This method indicates that the client is no longer interested
* in the operation result. It does not cancel the operation. If the server doesn't support this
@@ -43,12 +43,8 @@
import com.google.longrunning.stub.OperationsStubSettings;
import com.google.protobuf.Empty;
import java.io.IOException;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
/** Settings class to configure an instance of {@link OperationsClient}. */
@Generated("by GAPIC v0.0.5")
@BetaApi
public class OperationsSettings extends ClientSettings<OperationsSettings> {
/** Returns the object with the settings used for calls to getOperation. */
public UnaryCallSettings<GetOperationRequest, Operation> getOperationSettings() {
@@ -46,15 +46,12 @@
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.longrunning.Operation;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
/**
* gRPC callable factory implementation for Google Long Running Operations API.
*
* <p>This class is for advanced usage.
*/
@Generated("by GAPIC v0.0.5")
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcOperationsCallableFactory implements GrpcStubCallableFactory {
@Override
@@ -49,15 +49,12 @@
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

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

@@ -41,15 +41,12 @@
import com.google.longrunning.ListOperationsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import javax.annotation.Generated;

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

@@ -63,12 +63,9 @@
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import javax.annotation.Generated;
import org.threeten.bp.Duration;

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

@@ -51,7 +51,6 @@
import org.junit.BeforeClass;
import org.junit.Test;

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

0 comments on commit 5be66cd

Please sign in to comment.