KEMBAR78
feat: expose BucketInfo.getProject as a BigInteger by BenWhitehead · Pull Request #3119 · googleapis/java-storage · GitHub
Skip to content

Conversation

BenWhitehead
Copy link
Collaborator

Expose publicly the project field which was previously internal only. This field represents the project number of the project the bucket belongs to.

This field is still OUTPUT_ONLY, and as such does hot have a setter exposed.

Fixes #3023

@BenWhitehead BenWhitehead requested a review from a team as a code owner May 27, 2025 17:26
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels May 27, 2025
@BenWhitehead BenWhitehead force-pushed the feat/bucket-project branch from bec35cd to 2701269 Compare May 27, 2025 18:19
Expose publicly the project field which was previously internal only. This field represents the project number of the project the bucket belongs to.

This field is still OUTPUT_ONLY, and as such does hot have a setter exposed for it.

Fixes #3023
@BenWhitehead BenWhitehead force-pushed the feat/bucket-project branch from 2701269 to cc60695 Compare May 27, 2025 18:20
"softDeletePolicy",
"hierarchicalNamespace",
"website");
"projectNumber");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

website was defined twice, changing the second one to our new expected value.

"items/softDeletePolicy",
"items/hierarchicalNamespace",
"items/website");
"items/projectNumber");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

website was defined twice, changing the second one to our new expected value.


@Override
Builder setProject(String project) {
Builder setProject(BigInteger project) {

Choose a reason for hiding this comment

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

Should we name it set/getProjectNumber to make it more clear?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the v2/storage.proto it's named project in the discovery doc it's named projectNumber. Rather annoying.

We first added this field internally when doing the gRPC effort and before projectNUmber was public. In this case, I'm simply exposing the getter for the field we already have plumbed around.

@BenWhitehead BenWhitehead merged commit 64bbb60 into main May 28, 2025
23 checks passed
@BenWhitehead BenWhitehead deleted the feat/bucket-project branch May 28, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add getProjectNumber method to Bucket.java

2 participants