Skip to content

Commit

Permalink
fix: mark v1beta1 as deprecated (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Mar 27, 2020
1 parent c104615 commit 495f7f9
Show file tree
Hide file tree
Showing 12 changed files with 240 additions and 48 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -139,9 +139,12 @@
* FirestoreClient.create(firestoreSettings);
* </code>
* </pre>
*
* @deprecated Use com.google.cloud.firestore.v1.FirestoreClient instead
*/
@Generated("by gapic-generator")
@BetaApi
@Deprecated
public class FirestoreClient implements BackgroundResource {
private final FirestoreSettings settings;
private final FirestoreStub stub;
Expand Down Expand Up @@ -395,7 +398,8 @@ public final UnaryCallable<CreateDocumentRequest, Document> createDocumentCallab
* }
* </code></pre>
*
* @param document The updated document. Creates the document if it does not already exist.
* @param document Required. The updated document. Creates the document if it does not already
* exist.
* @param updateMask The fields to update. None of the field paths in the mask may contain a
* reserved name.
* <p>If the document exists on the server and has fields not referenced in the mask, they are
Expand All @@ -404,7 +408,6 @@ public final UnaryCallable<CreateDocumentRequest, Document> createDocumentCallab
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Document updateDocument(Document document, DocumentMask updateMask) {

UpdateDocumentRequest request =
UpdateDocumentRequest.newBuilder().setDocument(document).setUpdateMask(updateMask).build();
return updateDocument(request);
Expand Down Expand Up @@ -472,12 +475,11 @@ public final UnaryCallable<UpdateDocumentRequest, Document> updateDocumentCallab
* }
* </code></pre>
*
* @param name The resource name of the Document to delete. In the format:
* @param name Required. The resource name of the Document to delete. In the format:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteDocument(AnyPathName name) {

DeleteDocumentRequest request =
DeleteDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteDocument(request);
Expand All @@ -496,12 +498,11 @@ public final void deleteDocument(AnyPathName name) {
* }
* </code></pre>
*
* @param name The resource name of the Document to delete. In the format:
* @param name Required. The resource name of the Document to delete. In the format:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteDocument(String name) {

DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build();
deleteDocument(request);
}
Expand Down Expand Up @@ -594,12 +595,11 @@ public final UnaryCallable<DeleteDocumentRequest, Empty> deleteDocumentCallable(
* }
* </code></pre>
*
* @param database The database name. In the format:
* @param database Required. The database name. In the format:
* `projects/{project_id}/databases/{database_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BeginTransactionResponse beginTransaction(String database) {

BeginTransactionRequest request =
BeginTransactionRequest.newBuilder().setDatabase(database).build();
return beginTransaction(request);
Expand Down Expand Up @@ -665,14 +665,13 @@ public final BeginTransactionResponse beginTransaction(BeginTransactionRequest r
* }
* </code></pre>
*
* @param database The database name. In the format:
* @param database Required. The database name. In the format:
* `projects/{project_id}/databases/{database_id}`.
* @param writes The writes to apply.
* <p>Always executed atomically and in order.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final CommitResponse commit(String database, List<Write> writes) {

CommitRequest request =
CommitRequest.newBuilder().setDatabase(database).addAllWrites(writes).build();
return commit(request);
Expand Down Expand Up @@ -741,13 +740,12 @@ public final UnaryCallable<CommitRequest, CommitResponse> commitCallable() {
* }
* </code></pre>
*
* @param database The database name. In the format:
* @param database Required. The database name. In the format:
* `projects/{project_id}/databases/{database_id}`.
* @param transaction The transaction to roll back.
* @param transaction Required. The transaction to roll back.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void rollback(String database, ByteString transaction) {

RollbackRequest request =
RollbackRequest.newBuilder().setDatabase(database).setTransaction(transaction).build();
rollback(request);
Expand Down Expand Up @@ -893,7 +891,7 @@ public final BidiStreamingCallable<ListenRequest, ListenResponse> listenCallable
* }
* </code></pre>
*
* @param parent The parent document. In the format:
* @param parent Required. The parent document. In the format:
* `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example:
* `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,14 +80,21 @@
* <code>
* FirestoreSettings.Builder firestoreSettingsBuilder =
* FirestoreSettings.newBuilder();
* firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* firestoreSettingsBuilder
* .updateDocumentSettings()
* .setRetrySettings(
* firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FirestoreSettings firestoreSettings = firestoreSettingsBuilder.build();
* </code>
* </pre>
*
* @deprecated Use com.google.cloud.firestore.v1.FirestoreSettings instead
*/
@Generated("by gapic-generator")
@BetaApi
@Deprecated
public class FirestoreSettings extends ClientSettings<FirestoreSettings> {
/** Returns the object with the settings used for calls to getDocument. */
public UnaryCallSettings<GetDocumentRequest, Document> getDocumentSettings() {
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -95,8 +95,12 @@
* <code>
* FirestoreStubSettings.Builder firestoreSettingsBuilder =
* FirestoreStubSettings.newBuilder();
* firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* firestoreSettingsBuilder
* .updateDocumentSettings()
* .setRetrySettings(
* firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FirestoreStubSettings firestoreSettings = firestoreSettingsBuilder.build();
* </code>
* </pre>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Google LLC
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 495f7f9

Please sign in to comment.