-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make Project a subclass of ProjectInfo #572
Make Project a subclass of ProjectInfo #572
Conversation
21794d1
to
5a7e887
Compare
I like it! 👍 |
I need a bit more time to go through this. I follow up on Monday. |
} | ||
} | ||
|
||
Project(ResourceManager resourceManager, ProjectInfo.BuilderImpl infoBuilder) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I added a few nit comments. Great job @ajkannan I think this makes the API more usable without being verbose and keeps the code clean and maintainable. 👍 Btw, I can implement this in either bigquery or storage or both, just let me know! |
Looking a bit more into this. In bigquery we have a more complex situation where Info classes are part of a hierarchy. |
@mziccard I'll take Storage and Resource Manager, and if you can take BigQuery, that'd be great. I'll remove the "don't merge" label on this PR after I add changes to docs, fix the tests, and address the comments above. |
Incorporated comments thus far and also updated README, javadoc, and tests. Ready for another pass. |
Fixed more documentation issues and added a commit that adds a
rather than
|
@ajkannan empty replace method looks good to me! |
34fe23c
to
951be77
Compare
Added a commit to remove the original replace method. |
LGTM, please fix the doc issues we discussed before merge. |
951be77
to
a76e6c4
Compare
Fixed docs and re-tested sample in the docs. |
Make Project a subclass of ProjectInfo
Source-Link: googleapis/synthtool@1a2878d Post-Processor: gcr.io/repo-automation-bots/owlbot-java:latest@sha256:12cbdc4f137152a1a8b83f50ebc1a4098be0d3baff78b46efaec306f7cfafd13 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* fix: Fix recommendationengine resource name configuration PiperOrigin-RevId: 473779245 Source-Link: googleapis/googleapis@ee05df9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d151c136b7de66b7b524817360c639d011ef003d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDE1MWMxMzZiN2RlNjZiN2I1MjQ4MTczNjBjNjM5ZDAxMWVmMDAzZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.10.4](https://github.com/googleapis/java-recommendations-ai/compare/v0.10.3...v0.10.4) (2022-10-03) ### Bug Fixes * Fix recommendationengine resource name configuration ([#572](https://github.com/googleapis/java-recommendations-ai/issues/572)) ([2beea62](https://github.com/googleapis/java-recommendations-ai/commit/2beea629b8bd0dc2e0b934dac0c9a7c728ef71c1)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#574](https://github.com/googleapis/java-recommendations-ai/issues/574)) ([a7266ef](https://github.com/googleapis/java-recommendations-ai/commit/a7266ef9f0ad3a4be8222825b44025641cea63ba)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#601](https://github.com/googleapis/java-recommendations-ai/issues/601)) ([6fa10e1](https://github.com/googleapis/java-recommendations-ai/commit/6fa10e1206e125891b58cad6f78f1bdfeae247d4)) * Update dependency importlib-metadata to v4.12.0 ([#596](https://github.com/googleapis/java-recommendations-ai/issues/596)) ([cd541e7](https://github.com/googleapis/java-recommendations-ai/commit/cd541e72d4b0ac5a71aedf42f743ef66da7c191e)) * Update dependency jeepney to v0.8.0 ([#597](https://github.com/googleapis/java-recommendations-ai/issues/597)) ([32c3a1f](https://github.com/googleapis/java-recommendations-ai/commit/32c3a1f9e437a37fbc46981f8d0984d01d2b1785)) * Update dependency jinja2 to v3.1.2 ([#598](https://github.com/googleapis/java-recommendations-ai/issues/598)) ([6070770](https://github.com/googleapis/java-recommendations-ai/commit/6070770d7653bd1c5c33ddf717c6062926015882)) * Update dependency keyring to v23.9.3 ([#599](https://github.com/googleapis/java-recommendations-ai/issues/599)) ([454ca90](https://github.com/googleapis/java-recommendations-ai/commit/454ca90c112eb7c7da53a75ebf1cd31351af9c45)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [2.5.1](https://github.com/googleapis/java-retail/compare/v2.5.0...v2.5.1) (2022-10-03) ### Bug Fixes * **samples:** Bug fix for removing buckets from bq. ([#548](https://github.com/googleapis/java-retail/issues/548)) ([059da48](https://github.com/googleapis/java-retail/commit/059da48754191311b56521a4295d677eb3a7fcef)) * **samples:** Bug fix for setup script ([#549](https://github.com/googleapis/java-retail/issues/549)) ([b9ba700](https://github.com/googleapis/java-retail/commit/b9ba7003234a39569add3294534ac5af8a02fa50)) * **samples:** Lro added out-of-order step. ([#539](https://github.com/googleapis/java-retail/issues/539)) ([7913182](https://github.com/googleapis/java-retail/commit/7913182491c75c3f1937677da21bb80804e6b26c)) * **samples:** Removed delays on LRO ([#527](https://github.com/googleapis/java-retail/issues/527)) ([6c39da2](https://github.com/googleapis/java-retail/commit/6c39da291e0d0340ebe81f3f85b79bd1dea45118)) * **samples:** Replaced your-project-id with default. ([#541](https://github.com/googleapis/java-retail/issues/541)) ([b09050f](https://github.com/googleapis/java-retail/commit/b09050fabe81b8b0b8bcfe17c952bfa0870649c9)) * **samples:** Updating both json files. ([#540](https://github.com/googleapis/java-retail/issues/540)) ([0bcae2a](https://github.com/googleapis/java-retail/commit/0bcae2afe084f6765c3c51a783174063eb09d7e3)) ### Dependencies * Update dependency cachetools to v5 ([#566](https://github.com/googleapis/java-retail/issues/566)) ([44d49b5](https://github.com/googleapis/java-retail/commit/44d49b5571eab26fe6e3bd7720e91a2587ed6502)) * Update dependency certifi to v2022.9.24 ([#568](https://github.com/googleapis/java-retail/issues/568)) ([cbfb804](https://github.com/googleapis/java-retail/commit/cbfb804e99a310eab1231813cd65b8e3d7dafc58)) * Update dependency charset-normalizer to v2.1.1 ([#556](https://github.com/googleapis/java-retail/issues/556)) ([0ac7723](https://github.com/googleapis/java-retail/commit/0ac7723fae0e65a53116ed6c5be17fc32c7bb8a7)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.16.1 ([#542](https://github.com/googleapis/java-retail/issues/542)) ([7815252](https://github.com/googleapis/java-retail/commit/7815252c2eaa812fd6ed9903420ec63e027be917)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#577](https://github.com/googleapis/java-retail/issues/577)) ([2d2998c](https://github.com/googleapis/java-retail/commit/2d2998c70f92b1c8c7558f7f4ee7576b6d8ff677)) * Update dependency com.google.cloud:google-cloud-storage to v2.12.0 ([#543](https://github.com/googleapis/java-retail/issues/543)) ([4f90a58](https://github.com/googleapis/java-retail/commit/4f90a58aeebb015ed93d2c49725085016feba97d)) * Update dependency gcp-releasetool to v1.8.8 ([#569](https://github.com/googleapis/java-retail/issues/569)) ([15ca79e](https://github.com/googleapis/java-retail/commit/15ca79eb3c1c55c977b09e01eb995fd3e1906715)) * Update dependency google-api-core to v2.10.1 ([#558](https://github.com/googleapis/java-retail/issues/558)) ([217a955](https://github.com/googleapis/java-retail/commit/217a955111832eb7a0f71fc837da894d5ef0bc46)) * Update dependency google-auth to v2.11.1 ([#570](https://github.com/googleapis/java-retail/issues/570)) ([5380a6e](https://github.com/googleapis/java-retail/commit/5380a6e2ec881a46d343ef87511a1f91e3ccaae5)) * Update dependency google-cloud-core to v2.3.2 ([#554](https://github.com/googleapis/java-retail/issues/554)) ([8061d2c](https://github.com/googleapis/java-retail/commit/8061d2c1ad6279815758852afe29db3feabb19eb)) * Update dependency google-cloud-storage to v2.5.0 ([#559](https://github.com/googleapis/java-retail/issues/559)) ([e5a9e2e](https://github.com/googleapis/java-retail/commit/e5a9e2e4504835f412800395715e06cc29279608)) * Update dependency google-crc32c to v1.5.0 ([#560](https://github.com/googleapis/java-retail/issues/560)) ([b1a9b7b](https://github.com/googleapis/java-retail/commit/b1a9b7b96148319f157692530fc2bef61535756a)) * Update dependency googleapis-common-protos to v1.56.4 ([#555](https://github.com/googleapis/java-retail/issues/555)) ([7ca1cc7](https://github.com/googleapis/java-retail/commit/7ca1cc70abccb4914af7df2f679d37a9dba81f8d)) * Update dependency importlib-metadata to v4.12.0 ([#561](https://github.com/googleapis/java-retail/issues/561)) ([f492330](https://github.com/googleapis/java-retail/commit/f492330dc8f3e4039049c8e015237248177e1d28)) * Update dependency jeepney to v0.8.0 ([#571](https://github.com/googleapis/java-retail/issues/571)) ([dcb7b44](https://github.com/googleapis/java-retail/commit/dcb7b4430f1dc8767c0bec5028ec591b3b6707b9)) * Update dependency jinja2 to v3.1.2 ([#572](https://github.com/googleapis/java-retail/issues/572)) ([0ebba8d](https://github.com/googleapis/java-retail/commit/0ebba8d2b5b5d3ced9743d12dccba83a2527dce9)) * Update dependency keyring to v23.9.3 ([#573](https://github.com/googleapis/java-retail/issues/573)) ([83b04aa](https://github.com/googleapis/java-retail/commit/83b04aa019f83456093ec488b62471d729cf34ca)) * Update dependency markupsafe to v2.1.1 ([#553](https://github.com/googleapis/java-retail/issues/553)) ([58570b9](https://github.com/googleapis/java-retail/commit/58570b9a1a1658384ac1a719e5b77d62db3f9533)) * Update dependency protobuf to v3.20.2 ([#574](https://github.com/googleapis/java-retail/issues/574)) ([3ef6c0c](https://github.com/googleapis/java-retail/commit/3ef6c0cfcf5866a661731764ad85c762bb1cb081)) * Update dependency protobuf to v4 ([#567](https://github.com/googleapis/java-retail/issues/567)) ([d5fa224](https://github.com/googleapis/java-retail/commit/d5fa224128580e2ec42852442da84684ac38852a)) * Update dependency pyjwt to v2.5.0 ([#562](https://github.com/googleapis/java-retail/issues/562)) ([845850c](https://github.com/googleapis/java-retail/commit/845850cba4cf80c459ebbea37cb61b84f31e5388)) * Update dependency requests to v2.28.1 ([#563](https://github.com/googleapis/java-retail/issues/563)) ([759437f](https://github.com/googleapis/java-retail/commit/759437f1935995e18a09f5c492cf9b7421f6f8aa)) * Update dependency typing-extensions to v4.3.0 ([#564](https://github.com/googleapis/java-retail/issues/564)) ([afac7b9](https://github.com/googleapis/java-retail/commit/afac7b95f6f8dae5878cbbc088f23341566689f7)) * Update dependency zipp to v3.8.1 ([#565](https://github.com/googleapis/java-retail/issues/565)) ([1456cc4](https://github.com/googleapis/java-retail/commit/1456cc4c4e1b49e9b58b9428415e4d4aeb63dc64)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.6.6](https://github.com/googleapis/java-securitycenter-settings/compare/v0.6.5...v0.6.6) (2022-10-05) ### Dependencies * Update dependency certifi to v2022.9.24 ([#566](https://github.com/googleapis/java-securitycenter-settings/issues/566)) ([f9c5954](https://github.com/googleapis/java-securitycenter-settings/commit/f9c59549ce924c3d11e3e97c435981ea2e45fdf0)) * Update dependency charset-normalizer to v2.1.1 ([#570](https://github.com/googleapis/java-securitycenter-settings/issues/570)) ([1a67981](https://github.com/googleapis/java-securitycenter-settings/commit/1a67981fbc19320fbca4abc35b4e6da4a3561b0f)) * Update dependency click to v8.1.3 ([#571](https://github.com/googleapis/java-securitycenter-settings/issues/571)) ([a8f784e](https://github.com/googleapis/java-securitycenter-settings/commit/a8f784efe83cb56d8ea68a07c3aae2c6a3c7d003)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#577](https://github.com/googleapis/java-securitycenter-settings/issues/577)) ([1f98eed](https://github.com/googleapis/java-securitycenter-settings/commit/1f98eed175c141b30b06a97e5a7834583b1b9f40)) * Update dependency gcp-releasetool to v1.8.8 ([#567](https://github.com/googleapis/java-securitycenter-settings/issues/567)) ([663ab9f](https://github.com/googleapis/java-securitycenter-settings/commit/663ab9f0f3ce00f34b5b8fcf0c21f696b0fdf455)) * Update dependency google-api-core to v2.10.1 ([#572](https://github.com/googleapis/java-securitycenter-settings/issues/572)) ([8dcd58c](https://github.com/googleapis/java-securitycenter-settings/commit/8dcd58c2c65d7d64cbb1b4502f5b53eb7b11777c)) * Update dependency google-auth to v2.12.0 ([#573](https://github.com/googleapis/java-securitycenter-settings/issues/573)) ([26df30b](https://github.com/googleapis/java-securitycenter-settings/commit/26df30bf335aecb286d92195d6ec44c5f2d52f16)) * Update dependency google-cloud-core to v2.3.2 ([#568](https://github.com/googleapis/java-securitycenter-settings/issues/568)) ([dd01a84](https://github.com/googleapis/java-securitycenter-settings/commit/dd01a84cbf89b05330ce9f05c5a786c6f40ab03f)) * Update dependency google-cloud-storage to v2.5.0 ([#574](https://github.com/googleapis/java-securitycenter-settings/issues/574)) ([4b2b3f5](https://github.com/googleapis/java-securitycenter-settings/commit/4b2b3f5625c9be96c788ebcda38093d616beb805)) * Update dependency googleapis-common-protos to v1.56.4 ([#569](https://github.com/googleapis/java-securitycenter-settings/issues/569)) ([248ad71](https://github.com/googleapis/java-securitycenter-settings/commit/248ad71bfb348cdac2e8ea2091a311a1b97eedba)) * Update dependency jinja2 to v3.1.2 ([#575](https://github.com/googleapis/java-securitycenter-settings/issues/575)) ([098d82a](https://github.com/googleapis/java-securitycenter-settings/commit/098d82ab1cdbc575c075dcde35baecc1f6778a82)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…cp/templates/java_library/.kokoro (#1732) (#572) build(deps): bump certifi Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching <chingor@google.com> Source-Link: https://github.com/googleapis/synthtool/commit/ae0d43e5f17972981fe501ecf5a5d20055128bea Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:9de537d592b60e5eac73b374a28263969bae91ecdb29b445e894576fbf54851c
This is an alternate proof of concept for #530. This PR introduces the following changes:
ResourceManager
methods accept ProjectInfo objects but always return a ProjectProjectInfo
. BothProjectInfo.BuilderImpl
andProject.Builder
extend this abstract Builder.Project.Builder
delegate toProjectInfo.BuilderImpl
to avoid setter code duplication.ProjectInfo.BuilderImpl
andProject.Builder
.A user can create a
ProjectInfo
(without supplying a service object) when creating or updating a project. Since Resource Manager methods will returnProject
objects instead ofProjectInfo
objects, the user doesn't have to supply the service object any additional times for the typical use case.