Skip to content

fix: annotating some fields as REQUIRED #1695

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

Merged
merged 2 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix!: annotating some fields as REQUIRED
These fields were actually always required by the backend, so annotation just documents status quo. I believe this change will not require major version bump for any language.

PiperOrigin-RevId: 429093810

Source-Link: googleapis/googleapis@dc04c1c

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0e23469bea2f397f2b783c5a25e64452f86be6bc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGUyMzQ2OWJlYTJmMzk3ZjJiNzgzYzVhMjVlNjQ0NTJmODZiZTZiYyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Feb 16, 2022
commit 563a46594fc913303b9f81b45dfe045ff306c7e5
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@
* methods:
*
* <ol>
* <li>A "flattened" method. With this type of method, the fields of the request type have been
* <li> A "flattened" method. With this type of method, the fields of the request type have been
* converted into function parameters. It may be the case that not all fields are available as
* parameters, and not every API method will have a flattened method entry point.
* <li>A "request object" method. This type of method only takes one parameter, a request object,
* <li> A "request object" method. This type of method only takes one parameter, a request object,
* which must be constructed before the call. Not every API method will have a request object
* method.
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
* <li> A "callable" method. This type of method takes no parameters and returns an immutable API
* callable object, which can be used to initiate calls to the service.
* </ol>
*
Expand Down Expand Up @@ -2658,10 +2658,7 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted

public static class ListDatabasesPagedResponse
extends AbstractPagedListResponse<
ListDatabasesRequest,
ListDatabasesResponse,
Database,
ListDatabasesPage,
ListDatabasesRequest, ListDatabasesResponse, Database, ListDatabasesPage,
ListDatabasesFixedSizeCollection> {

public static ApiFuture<ListDatabasesPagedResponse> createAsync(
Expand Down Expand Up @@ -2711,10 +2708,7 @@ public ApiFuture<ListDatabasesPage> createPageAsync(

public static class ListDatabasesFixedSizeCollection
extends AbstractFixedSizeCollection<
ListDatabasesRequest,
ListDatabasesResponse,
Database,
ListDatabasesPage,
ListDatabasesRequest, ListDatabasesResponse, Database, ListDatabasesPage,
ListDatabasesFixedSizeCollection> {

private ListDatabasesFixedSizeCollection(List<ListDatabasesPage> pages, int collectionSize) {
Expand All @@ -2734,10 +2728,7 @@ protected ListDatabasesFixedSizeCollection createCollection(

public static class ListBackupsPagedResponse
extends AbstractPagedListResponse<
ListBackupsRequest,
ListBackupsResponse,
Backup,
ListBackupsPage,
ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage,
ListBackupsFixedSizeCollection> {

public static ApiFuture<ListBackupsPagedResponse> createAsync(
Expand Down Expand Up @@ -2784,10 +2775,7 @@ public ApiFuture<ListBackupsPage> createPageAsync(

public static class ListBackupsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListBackupsRequest,
ListBackupsResponse,
Backup,
ListBackupsPage,
ListBackupsRequest, ListBackupsResponse, Backup, ListBackupsPage,
ListBackupsFixedSizeCollection> {

private ListBackupsFixedSizeCollection(List<ListBackupsPage> pages, int collectionSize) {
Expand All @@ -2807,11 +2795,8 @@ protected ListBackupsFixedSizeCollection createCollection(

public static class ListDatabaseOperationsPagedResponse
extends AbstractPagedListResponse<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
Operation,
ListDatabaseOperationsPage,
ListDatabaseOperationsFixedSizeCollection> {
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse, Operation,
ListDatabaseOperationsPage, ListDatabaseOperationsFixedSizeCollection> {

public static ApiFuture<ListDatabaseOperationsPagedResponse> createAsync(
PageContext<ListDatabaseOperationsRequest, ListDatabaseOperationsResponse, Operation>
Expand All @@ -2832,9 +2817,7 @@ private ListDatabaseOperationsPagedResponse(ListDatabaseOperationsPage page) {

public static class ListDatabaseOperationsPage
extends AbstractPage<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
Operation,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse, Operation,
ListDatabaseOperationsPage> {

private ListDatabaseOperationsPage(
Expand Down Expand Up @@ -2867,11 +2850,8 @@ public ApiFuture<ListDatabaseOperationsPage> createPageAsync(

public static class ListDatabaseOperationsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
Operation,
ListDatabaseOperationsPage,
ListDatabaseOperationsFixedSizeCollection> {
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse, Operation,
ListDatabaseOperationsPage, ListDatabaseOperationsFixedSizeCollection> {

private ListDatabaseOperationsFixedSizeCollection(
List<ListDatabaseOperationsPage> pages, int collectionSize) {
Expand All @@ -2891,11 +2871,8 @@ protected ListDatabaseOperationsFixedSizeCollection createCollection(

public static class ListBackupOperationsPagedResponse
extends AbstractPagedListResponse<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
Operation,
ListBackupOperationsPage,
ListBackupOperationsFixedSizeCollection> {
ListBackupOperationsRequest, ListBackupOperationsResponse, Operation,
ListBackupOperationsPage, ListBackupOperationsFixedSizeCollection> {

public static ApiFuture<ListBackupOperationsPagedResponse> createAsync(
PageContext<ListBackupOperationsRequest, ListBackupOperationsResponse, Operation> context,
Expand All @@ -2915,9 +2892,7 @@ private ListBackupOperationsPagedResponse(ListBackupOperationsPage page) {

public static class ListBackupOperationsPage
extends AbstractPage<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
Operation,
ListBackupOperationsRequest, ListBackupOperationsResponse, Operation,
ListBackupOperationsPage> {

private ListBackupOperationsPage(
Expand Down Expand Up @@ -2947,11 +2922,8 @@ public ApiFuture<ListBackupOperationsPage> createPageAsync(

public static class ListBackupOperationsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
Operation,
ListBackupOperationsPage,
ListBackupOperationsFixedSizeCollection> {
ListBackupOperationsRequest, ListBackupOperationsResponse, Operation,
ListBackupOperationsPage, ListBackupOperationsFixedSizeCollection> {

private ListBackupOperationsFixedSizeCollection(
List<ListBackupOperationsPage> pages, int collectionSize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings;
Expand Down Expand Up @@ -77,9 +78,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (spanner.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (spanner.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -208,17 +209,15 @@ public UnaryCallSettings<RestoreDatabaseRequest, Operation> restoreDatabaseSetti

/** Returns the object with the settings used for calls to listDatabaseOperations. */
public PagedCallSettings<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings() {
return ((DatabaseAdminStubSettings) getStubSettings()).listDatabaseOperationsSettings();
}

/** Returns the object with the settings used for calls to listBackupOperations. */
public PagedCallSettings<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings() {
return ((DatabaseAdminStubSettings) getStubSettings()).listBackupOperationsSettings();
Expand Down Expand Up @@ -429,17 +428,15 @@ public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatab

/** Returns the builder for the settings used for calls to listDatabaseOperations. */
public PagedCallSettings.Builder<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings() {
return getStubSettingsBuilder().listDatabaseOperationsSettings();
}

/** Returns the builder for the settings used for calls to listBackupOperations. */
public PagedCallSettings.Builder<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings() {
return getStubSettingsBuilder().listBackupOperationsSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (spanner.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (spanner.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -158,13 +158,11 @@ public class DatabaseAdminStubSettings extends StubSettings<DatabaseAdminStubSet
private final OperationCallSettings<RestoreDatabaseRequest, Database, RestoreDatabaseMetadata>
restoreDatabaseOperationSettings;
private final PagedCallSettings<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings;
private final PagedCallSettings<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings;

Expand Down Expand Up @@ -357,13 +355,11 @@ public ApiFuture<ListBackupsPagedResponse> getFuturePagedResponse(
};

private static final PagedListResponseFactory<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
LIST_DATABASE_OPERATIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>() {
@Override
public ApiFuture<ListDatabaseOperationsPagedResponse> getFuturePagedResponse(
Expand All @@ -381,13 +377,11 @@ public ApiFuture<ListDatabaseOperationsPagedResponse> getFuturePagedResponse(
};

private static final PagedListResponseFactory<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
LIST_BACKUP_OPERATIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>() {
@Override
public ApiFuture<ListBackupOperationsPagedResponse> getFuturePagedResponse(
Expand Down Expand Up @@ -507,17 +501,15 @@ public UnaryCallSettings<RestoreDatabaseRequest, Operation> restoreDatabaseSetti

/** Returns the object with the settings used for calls to listDatabaseOperations. */
public PagedCallSettings<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings() {
return listDatabaseOperationsSettings;
}

/** Returns the object with the settings used for calls to listBackupOperations. */
public PagedCallSettings<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings() {
return listBackupOperationsSettings;
Expand Down Expand Up @@ -662,13 +654,11 @@ public static class Builder extends StubSettings.Builder<DatabaseAdminStubSettin
RestoreDatabaseRequest, Database, RestoreDatabaseMetadata>
restoreDatabaseOperationSettings;
private final PagedCallSettings.Builder<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings;
private final PagedCallSettings.Builder<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings;
private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>>
Expand Down Expand Up @@ -1169,17 +1159,15 @@ public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatab

/** Returns the builder for the settings used for calls to listDatabaseOperations. */
public PagedCallSettings.Builder<
ListDatabaseOperationsRequest,
ListDatabaseOperationsResponse,
ListDatabaseOperationsRequest, ListDatabaseOperationsResponse,
ListDatabaseOperationsPagedResponse>
listDatabaseOperationsSettings() {
return listDatabaseOperationsSettings;
}

/** Returns the builder for the settings used for calls to listBackupOperations. */
public PagedCallSettings.Builder<
ListBackupOperationsRequest,
ListBackupOperationsResponse,
ListBackupOperationsRequest, ListBackupOperationsResponse,
ListBackupOperationsPagedResponse>
listBackupOperationsSettings() {
return listBackupOperationsSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Loading