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

docs: began merging variant client samples #696

Merged
merged 1 commit into from Jul 13, 2021
Merged

Conversation

craiglabenz
Copy link
Contributor

This comes as part of an effort to consolidate the firestore_setup_client_create and firestore_setup_client_create_with_project_id regions.

@snippet-bot
Copy link

snippet-bot bot commented Jul 13, 2021

Here is the summary of possible violations 😱

There is a possible violation for not having product prefix.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 3 region tags.
You are about to delete 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added api: firestore Issues related to the googleapis/java-firestore API. samples Issues that are directly related to samples. labels Jul 13, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 13, 2021
@craiglabenz
Copy link
Contributor Author

CI appears to be upset that I moved a pre-existing region tag?

Copy link
Collaborator

@kolea2 kolea2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think the region tags look fine. I think it's warning about the format of fs_initialize, but since this already exists we should leave as is for this PR.

@craiglabenz
Copy link
Contributor Author

For posterity, the new snippet looks like this:

// Option 1: Initialize a Firestore client with a specific `projectId` and
//           authorization credential.
FirestoreOptions firestoreOptions =
    FirestoreOptions.getDefaultInstance().toBuilder()
        .setProjectId(projectId)
        .setCredentials(GoogleCredentials.getApplicationDefault())
        .build();
Firestore db = firestoreOptions.getService();

// Option 2: Initialize a Firestore client with default values inferred from
//           your environment.
Firestore db = FirestoreOptions.getDefaultInstance().getService();

@craiglabenz craiglabenz merged commit 0a10dd8 into master Jul 13, 2021
@craiglabenz craiglabenz deleted the client-project-id branch July 13, 2021 19:54
gcf-merge-on-green bot pushed a commit that referenced this pull request Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants