GeezerVison is showing github.com — Add common interface for field selectors by mziccard · Pull Request #807 · googleapis/google-cloud-java
Conversation
This is (finally) a first attempt at fixing #456.
Not related to this PR: in dns what was the Option class became AbstractOption and is now abstract. I agree that this class should be abstract but I believed we never used the Abstract prefix for abstract classes. I believe we should stick to Option (or BaseOption if you prefer) and should make all other classes abstract as well. Thoughts?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
aozarov reacted with thumbs up emoji
|

Coverage decreased (-0.03%) to 85.548% when pulling 712b255 on mziccard:field-selector into 2819942 on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
/**
|
|
|
* Interface for Google Cloud resource's fields. Implementations of this interface can be used to
|
|
|
* select only desired fields when getting or listing Google Cloud resources.
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Add FieldSelector.SelectorHelper with static methods to create selectors
- Add SelectorHelperTest
- Rename dns.AbstractOption to Option, make other Option classes abstract
- Add OptionTest class to resource manager and refactor other OptionTest classes
|

Coverage decreased (-0.08%) to 85.496% when pulling 1710a4c on mziccard:field-selector into 6747274 on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I fixed comments:
- Add
FieldSelector.SelectorHelper with static methods to create selectors
- Add
SelectorHelperTest
- Rename
dns.AbstractOption to Option, make other Option classes abstract
- Add
OptionTest class to resource manager and refactor other OptionTest classes
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
* string selector returned by this method can be used for field selection in API calls that
|
|
|
* return a list of resources. This method is not supposed to be used directly by users.
|
|
|
*/
|
|
|
public static String selector(String containerName, List<FieldSelector> required,
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Looks great. Few comments and suggestions and I think you can merge after.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Rename selector method for lists to listSelector
- Update selectors to accept List<? extends FieldSelector> parameters
- Add missing unit test for listSelector
- Remove redundant extends Serializable from dns' option classes
|

Coverage decreased (-0.07%) to 85.506% when pulling 8db4b9b on mziccard:field-selector into 6747274 on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
/**
|
|
|
* Class for specifying zone listing options.
|
|
|
*/
|
|
|
class ZoneListOption extends AbstractOption implements Serializable {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
cla: yes
This human has signed the Contributor License Agreement.
type: cleanup
An internal cleanup or hygiene concern.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|