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

Commit

Permalink
fix(operations): Make Operations a manual client [gax-java] (#1282)
Browse files Browse the repository at this point in the history
* 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 5be66cd
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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`.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5be66cd

Please sign in to comment.