Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add authorized view bindings to Cloud Bigtable data APIs and messages #2144

Merged
merged 7 commits into from
Mar 5, 2024

Large diffs are not rendered by default.

Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.bigtable.admin.v2;

import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
Expand All @@ -32,25 +33,32 @@
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
Expand All @@ -66,6 +74,8 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
Expand Down Expand Up @@ -144,6 +154,49 @@ public UnaryCallSettings<UndeleteTableRequest, Operation> undeleteTableSettings(
return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableOperationSettings();
}

/** Returns the object with the settings used for calls to createAuthorizedView. */
public UnaryCallSettings<CreateAuthorizedViewRequest, Operation> createAuthorizedViewSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).createAuthorizedViewSettings();
}

/** Returns the object with the settings used for calls to createAuthorizedView. */
public OperationCallSettings<
CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
createAuthorizedViewOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings())
.createAuthorizedViewOperationSettings();
}

/** Returns the object with the settings used for calls to listAuthorizedViews. */
public PagedCallSettings<
ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, ListAuthorizedViewsPagedResponse>
listAuthorizedViewsSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).listAuthorizedViewsSettings();
}

/** Returns the object with the settings used for calls to getAuthorizedView. */
public UnaryCallSettings<GetAuthorizedViewRequest, AuthorizedView> getAuthorizedViewSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).getAuthorizedViewSettings();
}

/** Returns the object with the settings used for calls to updateAuthorizedView. */
public UnaryCallSettings<UpdateAuthorizedViewRequest, Operation> updateAuthorizedViewSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).updateAuthorizedViewSettings();
}

/** Returns the object with the settings used for calls to updateAuthorizedView. */
public OperationCallSettings<
UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
updateAuthorizedViewOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings())
.updateAuthorizedViewOperationSettings();
}

/** Returns the object with the settings used for calls to deleteAuthorizedView. */
public UnaryCallSettings<DeleteAuthorizedViewRequest, Empty> deleteAuthorizedViewSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).deleteAuthorizedViewSettings();
}

/** Returns the object with the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings<ModifyColumnFamiliesRequest, Table> modifyColumnFamiliesSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).modifyColumnFamiliesSettings();
Expand Down Expand Up @@ -416,6 +469,53 @@ public UnaryCallSettings.Builder<UndeleteTableRequest, Operation> undeleteTableS
return getStubSettingsBuilder().undeleteTableOperationSettings();
}

/** Returns the builder for the settings used for calls to createAuthorizedView. */
public UnaryCallSettings.Builder<CreateAuthorizedViewRequest, Operation>
createAuthorizedViewSettings() {
return getStubSettingsBuilder().createAuthorizedViewSettings();
}

/** Returns the builder for the settings used for calls to createAuthorizedView. */
public OperationCallSettings.Builder<
CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
createAuthorizedViewOperationSettings() {
return getStubSettingsBuilder().createAuthorizedViewOperationSettings();
}

/** Returns the builder for the settings used for calls to listAuthorizedViews. */
public PagedCallSettings.Builder<
ListAuthorizedViewsRequest,
ListAuthorizedViewsResponse,
ListAuthorizedViewsPagedResponse>
listAuthorizedViewsSettings() {
return getStubSettingsBuilder().listAuthorizedViewsSettings();
}

/** Returns the builder for the settings used for calls to getAuthorizedView. */
public UnaryCallSettings.Builder<GetAuthorizedViewRequest, AuthorizedView>
getAuthorizedViewSettings() {
return getStubSettingsBuilder().getAuthorizedViewSettings();
}

/** Returns the builder for the settings used for calls to updateAuthorizedView. */
public UnaryCallSettings.Builder<UpdateAuthorizedViewRequest, Operation>
updateAuthorizedViewSettings() {
return getStubSettingsBuilder().updateAuthorizedViewSettings();
}

/** Returns the builder for the settings used for calls to updateAuthorizedView. */
public OperationCallSettings.Builder<
UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
updateAuthorizedViewOperationSettings() {
return getStubSettingsBuilder().updateAuthorizedViewOperationSettings();
}

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

/** Returns the builder for the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings.Builder<ModifyColumnFamiliesRequest, Table>
modifyColumnFamiliesSettings() {
Expand Down
Expand Up @@ -128,6 +128,17 @@ public String toString() {
.add("updateTableOperationSettings", stubSettings.updateTableOperationSettings())
.add("copyBackupSettings", stubSettings.copyBackupSettings())
.add("copyBackupOperationSettings", stubSettings.copyBackupOperationSettings())
.add("createAuthorizedViewSettings", stubSettings.createAuthorizedViewSettings())
.add(
"createAuthorizedViewOperationSettings",
stubSettings.createAuthorizedViewOperationSettings())
.add("updateAuthorizedViewSettings", stubSettings.updateAuthorizedViewSettings())
.add(
"updateAuthorizedViewOperationSettings",
stubSettings.updateAuthorizedViewOperationSettings())
.add("deleteAuthorizedViewSettings", stubSettings.deleteAuthorizedViewSettings())
.add("listAuthorizedViewsSettings", stubSettings.listAuthorizedViewsSettings())
.add("getAuthorizedViewSettings", stubSettings.getAuthorizedViewSettings())
.toString();
}

Expand Down
Expand Up @@ -88,6 +88,9 @@
"CopyBackup": {
"methods": ["copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupOperationCallable", "copyBackupCallable"]
},
"CreateAuthorizedView": {
"methods": ["createAuthorizedViewAsync", "createAuthorizedViewAsync", "createAuthorizedViewAsync", "createAuthorizedViewOperationCallable", "createAuthorizedViewCallable"]
},
"CreateBackup": {
"methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"]
},
Expand All @@ -97,6 +100,9 @@
"CreateTableFromSnapshot": {
"methods": ["createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotOperationCallable", "createTableFromSnapshotCallable"]
},
"DeleteAuthorizedView": {
"methods": ["deleteAuthorizedView", "deleteAuthorizedView", "deleteAuthorizedView", "deleteAuthorizedViewCallable"]
},
"DeleteBackup": {
"methods": ["deleteBackup", "deleteBackup", "deleteBackup", "deleteBackupCallable"]
},
Expand All @@ -112,6 +118,9 @@
"GenerateConsistencyToken": {
"methods": ["generateConsistencyToken", "generateConsistencyToken", "generateConsistencyToken", "generateConsistencyTokenCallable"]
},
"GetAuthorizedView": {
"methods": ["getAuthorizedView", "getAuthorizedView", "getAuthorizedView", "getAuthorizedViewCallable"]
},
"GetBackup": {
"methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"]
},
Expand All @@ -124,6 +133,9 @@
"GetTable": {
"methods": ["getTable", "getTable", "getTable", "getTableCallable"]
},
"ListAuthorizedViews": {
"methods": ["listAuthorizedViews", "listAuthorizedViews", "listAuthorizedViews", "listAuthorizedViewsPagedCallable", "listAuthorizedViewsCallable"]
},
"ListBackups": {
"methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"]
},
Expand Down Expand Up @@ -151,6 +163,9 @@
"UndeleteTable": {
"methods": ["undeleteTableAsync", "undeleteTableAsync", "undeleteTableAsync", "undeleteTableOperationCallable", "undeleteTableCallable"]
},
"UpdateAuthorizedView": {
"methods": ["updateAuthorizedViewAsync", "updateAuthorizedViewAsync", "updateAuthorizedViewOperationCallable", "updateAuthorizedViewCallable"]
},
"UpdateBackup": {
"methods": ["updateBackup", "updateBackup", "updateBackupCallable"]
},
Expand Down
Expand Up @@ -21,7 +21,6 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
Expand Down Expand Up @@ -1081,8 +1080,6 @@ public UnaryCallSettings.Builder<CreateInstanceRequest, Operation> createInstanc
}

/** Returns the builder for the settings used for calls to createInstance. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateInstanceRequest, Instance, CreateInstanceMetadata>
createInstanceOperationSettings() {
return createInstanceOperationSettings;
Expand Down Expand Up @@ -1111,8 +1108,6 @@ public UnaryCallSettings.Builder<Instance, Instance> updateInstanceSettings() {
}

/** Returns the builder for the settings used for calls to partialUpdateInstance. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
PartialUpdateInstanceRequest, Instance, UpdateInstanceMetadata>
partialUpdateInstanceOperationSettings() {
Expand All @@ -1130,8 +1125,6 @@ public UnaryCallSettings.Builder<CreateClusterRequest, Operation> createClusterS
}

/** Returns the builder for the settings used for calls to createCluster. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateClusterRequest, Cluster, CreateClusterMetadata>
createClusterOperationSettings() {
return createClusterOperationSettings;
Expand All @@ -1154,8 +1147,6 @@ public UnaryCallSettings.Builder<Cluster, Operation> updateClusterSettings() {
}

/** Returns the builder for the settings used for calls to updateCluster. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<Cluster, Cluster, UpdateClusterMetadata>
updateClusterOperationSettings() {
return updateClusterOperationSettings;
Expand All @@ -1168,8 +1159,6 @@ public UnaryCallSettings.Builder<Cluster, Operation> updateClusterSettings() {
}

/** Returns the builder for the settings used for calls to partialUpdateCluster. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
PartialUpdateClusterRequest, Cluster, PartialUpdateClusterMetadata>
partialUpdateClusterOperationSettings() {
Expand Down Expand Up @@ -1206,8 +1195,6 @@ public UnaryCallSettings.Builder<GetAppProfileRequest, AppProfile> getAppProfile
}

/** Returns the builder for the settings used for calls to updateAppProfile. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
UpdateAppProfileRequest, AppProfile, UpdateAppProfileMetadata>
updateAppProfileOperationSettings() {
Expand Down