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

[CHANGE ME] Re-generated to pick up changes from googleapis. #64

Merged
merged 2 commits into from Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -377,6 +377,57 @@ public final UnaryCallable<GetConnectionRequest, Connection> getConnectionCallab
return stub.getConnectionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns a list of connections in the given project.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Connection element : connectionServiceClient.listConnections(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* </code></pre>
*
* @param parent Required. Parent resource name. Must be in the form:
* `projects/{project_id}/locations/{location_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListConnectionsPagedResponse listConnections(LocationName parent) {
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listConnections(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns a list of connections in the given project.
*
* <p>Sample code:
*
* <pre><code>
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Connection element : connectionServiceClient.listConnections(parent.toString()).iterateAll()) {
* // doThingsWith(element);
* }
* }
* </code></pre>
*
* @param parent Required. Parent resource name. Must be in the form:
* `projects/{project_id}/locations/{location_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListConnectionsPagedResponse listConnections(String parent) {
ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build();
return listConnections(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns a list of connections in the given project.
Expand Down Expand Up @@ -784,7 +835,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -816,7 +867,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -845,7 +896,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
Expand All @@ -872,7 +923,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
/**
* Sets the access control policy on the specified resource. Replaces any existing policy.
*
* <p>Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
*
* <p>Sample code:
*
Expand All @@ -897,7 +948,7 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
Expand Down Expand Up @@ -933,7 +984,7 @@ public final TestIamPermissionsResponse testIamPermissions(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
Expand Down Expand Up @@ -969,7 +1020,7 @@ public final TestIamPermissionsResponse testIamPermissions(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
Expand Down Expand Up @@ -999,7 +1050,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that a caller has on the specified resource. If the resource does not
* exist, this will return an empty set of permissions, not a NOT_FOUND error.
* exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
*
* <p>Note: This operation is designed to be used for building permission-aware UIs and
* command-line tools, not for authorization checking. This operation may "fail open" without
Expand Down
Expand Up @@ -222,14 +222,8 @@ public void listConnectionsTest() {
mockConnectionService.addResponse(expectedResponse);

LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
int pageSize = 883849137;
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(parent.toString())
.setPageSize(pageSize)
.build();

ListConnectionsPagedResponse pagedListResponse = client.listConnections(request);
ListConnectionsPagedResponse pagedListResponse = client.listConnections(parent);

List<Connection> resources = Lists.newArrayList(pagedListResponse.iterateAll());
Assert.assertEquals(1, resources.size());
Expand All @@ -240,7 +234,6 @@ public void listConnectionsTest() {
ListConnectionsRequest actualRequest = (ListConnectionsRequest) actualRequests.get(0);

Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent()));
Assert.assertEquals(pageSize, actualRequest.getPageSize());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -255,14 +248,8 @@ public void listConnectionsExceptionTest() throws Exception {

try {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
int pageSize = 883849137;
ListConnectionsRequest request =
ListConnectionsRequest.newBuilder()
.setParent(parent.toString())
.setPageSize(pageSize)
.build();

client.listConnections(request);

client.listConnections(parent);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception
Expand Down
Expand Up @@ -536,7 +536,7 @@ public void getIamPolicy(
* <pre>
* Sets the access control policy on the specified resource. Replaces any
* existing policy.
* Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
* </pre>
*/
public void setIamPolicy(
Expand All @@ -551,7 +551,7 @@ public void setIamPolicy(
* <pre>
* Returns permissions that a caller has on the specified resource.
* If the resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
* permissions, not a `NOT_FOUND` error.
* Note: This operation is designed to be used for building permission-aware
* UIs and command-line tools, not for authorization checking. This operation
* may "fail open" without warning.
Expand Down Expand Up @@ -752,7 +752,7 @@ public void getIamPolicy(
* <pre>
* Sets the access control policy on the specified resource. Replaces any
* existing policy.
* Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
* </pre>
*/
public void setIamPolicy(
Expand All @@ -770,7 +770,7 @@ public void setIamPolicy(
* <pre>
* Returns permissions that a caller has on the specified resource.
* If the resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
* permissions, not a `NOT_FOUND` error.
* Note: This operation is designed to be used for building permission-aware
* UIs and command-line tools, not for authorization checking. This operation
* may "fail open" without warning.
Expand Down Expand Up @@ -890,7 +890,7 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque
* <pre>
* Sets the access control policy on the specified resource. Replaces any
* existing policy.
* Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
* </pre>
*/
public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) {
Expand All @@ -903,7 +903,7 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
* <pre>
* Returns permissions that a caller has on the specified resource.
* If the resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
* permissions, not a `NOT_FOUND` error.
* Note: This operation is designed to be used for building permission-aware
* UIs and command-line tools, not for authorization checking. This operation
* may "fail open" without warning.
Expand Down Expand Up @@ -1026,7 +1026,7 @@ protected ConnectionServiceFutureStub build(
* <pre>
* Sets the access control policy on the specified resource. Replaces any
* existing policy.
* Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
* Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.iam.v1.Policy>
Expand All @@ -1041,7 +1041,7 @@ protected ConnectionServiceFutureStub build(
* <pre>
* Returns permissions that a caller has on the specified resource.
* If the resource does not exist, this will return an empty set of
* permissions, not a NOT_FOUND error.
* permissions, not a `NOT_FOUND` error.
* Note: This operation is designed to be used for building permission-aware
* UIs and command-line tools, not for authorization checking. This operation
* may "fail open" without warning.
Expand Down Expand Up @@ -1150,7 +1150,7 @@ private abstract static class ConnectionServiceBaseDescriptorSupplier

@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto.getDescriptor();
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass.getDescriptor();
}

@java.lang.Override
Expand Down
Expand Up @@ -105,14 +105,14 @@ private CloudSqlCredential(
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.CloudSqlCredential.class,
Expand Down Expand Up @@ -400,14 +400,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3
// @@protoc_insertion_point(builder_implements:google.cloud.bigquery.connection.v1.CloudSqlCredential)
com.google.cloud.bigquery.connection.v1.CloudSqlCredentialOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.CloudSqlCredential.class,
Expand Down Expand Up @@ -440,7 +440,7 @@ public Builder clear() {

@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_descriptor;
}

Expand Down
Expand Up @@ -130,14 +130,14 @@ private CloudSqlProperties(
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlProperties_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.CloudSqlProperties.class,
Expand Down Expand Up @@ -706,14 +706,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3
// @@protoc_insertion_point(builder_implements:google.cloud.bigquery.connection.v1.CloudSqlProperties)
com.google.cloud.bigquery.connection.v1.CloudSqlPropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlProperties_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.CloudSqlProperties.class,
Expand Down Expand Up @@ -754,7 +754,7 @@ public Builder clear() {

@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_CloudSqlProperties_descriptor;
}

Expand Down
Expand Up @@ -149,14 +149,14 @@ private Connection(
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_Connection_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_Connection_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.Connection.class,
Expand Down Expand Up @@ -706,14 +706,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3
// @@protoc_insertion_point(builder_implements:google.cloud.bigquery.connection.v1.Connection)
com.google.cloud.bigquery.connection.v1.ConnectionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_Connection_descriptor;
}

@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_Connection_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.bigquery.connection.v1.Connection.class,
Expand Down Expand Up @@ -756,7 +756,7 @@ public Builder clear() {

@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.bigquery.connection.v1.ConnectionProto
return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass
.internal_static_google_cloud_bigquery_connection_v1_Connection_descriptor;
}

Expand Down