Skip to content
Permalink
Browse files
feat: proto updates (#78)
* fix: migrate bq/connection/v1beta1 to grpc_service_config

PiperOrigin-RevId: 320216738

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jul 8 10:33:41 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: f0919d48d5fcbfd2d2e30ad3fe6ad7ea2685efc5
Source-Link: googleapis/googleapis@f0919d4

* fix: migrate bq/connection/v1 to grpc_service_config

PiperOrigin-RevId: 320217000

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jul 8 10:34:46 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: c4ed5e8114b75a84929aa146a72e9e75a4027c8d
Source-Link: googleapis/googleapis@c4ed5e8
  • Loading branch information
yoshi-automation committed Jul 9, 2020
1 parent 8ce50d0 commit 2d47c35289889de83d84b2b8fafd5edee11e553f
@@ -54,8 +54,10 @@
* <pre>
* <code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name);
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Connection connection = Connection.newBuilder().build();
* String connectionId = "";
* Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
* }
* </code>
* </pre>
@@ -165,96 +167,6 @@ public ConnectionServiceStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name);
* }
* </code></pre>
*
* @param name Required. Name of the deleted connection, for example:
* `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(ConnectionName name) {
DeleteConnectionRequest request =
DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteConnection(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name.toString());
* }
* </code></pre>
*
* @param name Required. Name of the deleted connection, for example:
* `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(String name) {
DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build();
deleteConnection(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
* .setName(name.toString())
* .build();
* connectionServiceClient.deleteConnection(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(DeleteConnectionRequest request) {
deleteConnectionCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = connectionServiceClient.deleteConnectionCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() {
return stub.deleteConnectionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates a new connection.
@@ -761,6 +673,96 @@ public final void updateConnectionCredential(UpdateConnectionCredentialRequest r
return stub.updateConnectionCredentialCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name);
* }
* </code></pre>
*
* @param name Required. Name of the deleted connection, for example:
* `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(ConnectionName name) {
DeleteConnectionRequest request =
DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteConnection(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name.toString());
* }
* </code></pre>
*
* @param name Required. Name of the deleted connection, for example:
* `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(String name) {
DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build();
deleteConnection(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
* .setName(name.toString())
* .build();
* connectionServiceClient.deleteConnection(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(DeleteConnectionRequest request) {
deleteConnectionCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = connectionServiceClient.deleteConnectionCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() {
return stub.deleteConnectionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
@@ -60,16 +60,16 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of deleteConnection to 30 seconds:
* <p>For example, to set the total timeout of createConnection to 30 seconds:
*
* <pre>
* <code>
* ConnectionServiceSettings.Builder connectionServiceSettingsBuilder =
* ConnectionServiceSettings.newBuilder();
* connectionServiceSettingsBuilder
* .deleteConnectionSettings()
* .createConnectionSettings()
* .setRetrySettings(
* connectionServiceSettingsBuilder.deleteConnectionSettings().getRetrySettings().toBuilder()
* connectionServiceSettingsBuilder.createConnectionSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ConnectionServiceSettings connectionServiceSettings = connectionServiceSettingsBuilder.build();
@@ -79,11 +79,6 @@
@Generated("by gapic-generator")
@BetaApi
public class ConnectionServiceSettings extends ClientSettings<ConnectionServiceSettings> {
/** Returns the object with the settings used for calls to deleteConnection. */
public UnaryCallSettings<DeleteConnectionRequest, Empty> deleteConnectionSettings() {
return ((ConnectionServiceStubSettings) getStubSettings()).deleteConnectionSettings();
}

/** Returns the object with the settings used for calls to createConnection. */
public UnaryCallSettings<CreateConnectionRequest, Connection> createConnectionSettings() {
return ((ConnectionServiceStubSettings) getStubSettings()).createConnectionSettings();
@@ -111,6 +106,11 @@ public UnaryCallSettings<UpdateConnectionRequest, Connection> updateConnectionSe
return ((ConnectionServiceStubSettings) getStubSettings()).updateConnectionCredentialSettings();
}

/** Returns the object with the settings used for calls to deleteConnection. */
public UnaryCallSettings<DeleteConnectionRequest, Empty> deleteConnectionSettings() {
return ((ConnectionServiceStubSettings) getStubSettings()).deleteConnectionSettings();
}

/** Returns the object with the settings used for calls to getIamPolicy. */
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return ((ConnectionServiceStubSettings) getStubSettings()).getIamPolicySettings();
@@ -224,11 +224,6 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to deleteConnection. */
public UnaryCallSettings.Builder<DeleteConnectionRequest, Empty> deleteConnectionSettings() {
return getStubSettingsBuilder().deleteConnectionSettings();
}

/** Returns the builder for the settings used for calls to createConnection. */
public UnaryCallSettings.Builder<CreateConnectionRequest, Connection>
createConnectionSettings() {
@@ -258,6 +253,11 @@ public UnaryCallSettings.Builder<GetConnectionRequest, Connection> getConnection
return getStubSettingsBuilder().updateConnectionCredentialSettings();
}

/** Returns the builder for the settings used for calls to deleteConnection. */
public UnaryCallSettings.Builder<DeleteConnectionRequest, Empty> deleteConnectionSettings() {
return getStubSettingsBuilder().deleteConnectionSettings();
}

/** Returns the builder for the settings used for calls to getIamPolicy. */
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
return getStubSettingsBuilder().getIamPolicySettings();
@@ -28,8 +28,10 @@
* <pre>
* <code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name);
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Connection connection = Connection.newBuilder().build();
* String connectionId = "";
* Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
* }
* </code>
* </pre>
@@ -44,10 +44,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class ConnectionServiceStub implements BackgroundResource {

public UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteConnectionCallable()");
}

public UnaryCallable<CreateConnectionRequest, Connection> createConnectionCallable() {
throw new UnsupportedOperationException("Not implemented: createConnectionCallable()");
}
@@ -70,6 +66,10 @@ public UnaryCallable<UpdateConnectionRequest, Connection> updateConnectionCallab
"Not implemented: updateConnectionCredentialCallable()");
}

public UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteConnectionCallable()");
}

public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
}

0 comments on commit 2d47c35

Please sign in to comment.