From ed8feec21479774b8a31193d1384f682e847e0d8 Mon Sep 17 00:00:00 2001 From: Charlie Yu Date: Fri, 11 Nov 2022 15:09:13 -0500 Subject: [PATCH] migrate code from googleapis/java-optimization (#7409) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: initial generation * test(deps): update dependency com.google.truth:truth to v1.1.3 (#11) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.truth:truth](https://togithub.com/google/truth) | `1.0.1` -> `1.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/compatibility-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/confidence-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * test(deps): update dependency junit:junit to v4.13.2 (#5) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [junit:junit](http://junit.org) ([source](https://togithub.com/junit-team/junit4)) | `4.13` -> `4.13.2` | [![age](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/compatibility-slim/4.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/confidence-slim/4.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.2.0 (#10) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | `1.0.12` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/compatibility-slim/1.0.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/confidence-slim/1.0.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.2.0`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) ### [`v1.0.24`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24) ### [`v1.0.23`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.22...v1.0.23) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.22...v1.0.23) ### [`v1.0.22`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.22) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.21...v1.0.22) - Latest plugins - updated google_checks.xml - Make release easier - Emily instead of Dane - Require mvn -P release install ### [`v1.0.21`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.21) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.20...v1.0.21) - Allow IT in test names. - various updates to plugins ### [`v1.0.20`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.20) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.19...v1.0.20) Add back the ability to SuppressWarnings ### [`v1.0.19`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.19) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.18...v1.0.19) Update plugins, limit SpotBugs issues, add use of `-D skipTests=true` ### [`v1.0.18`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.17...v1.0.18) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.17...v1.0.18) ### [`v1.0.17`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.17) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.16...v1.0.17) - require -P lint Lets not burden customers with our development rules. - Move Checkstyle, ErrorProne, PMD, and SpotBugs to only run w/ -P lint - Update the Readme - spotbugs-annotations 4.0.2 ### [`v1.0.16`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.16) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.15...v1.0.16) Add a few SpotBugs exclusions: - `RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE` - existing - codegen bug - `UPM_UNCALLED_PRIVATE_METHOD` - probably SpotBug issue - `NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE` - likely SpotBug issue - `CLI_CONSTANT_LIST_INDEX` - style issue particular to our samples - `OBL_UNSATISFIED_OBLIGATION` - issue for SQL clients ### [`v1.0.15`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.15) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.14...v1.0.15) - Move some stuff around (in prep for a change to release process) pom.xml's - Add an exclude filter for SpotBugs. (disable the Java 11 surprise) - Don't fail on SpotBugs issues for now - add PMD reporting - Don't fail on PMD issues for now. ### [`v1.0.14`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.14) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.13...v1.0.14) - Update CheckStyle to 8.31 - Add SpotBugs ### [`v1.0.13`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.13) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.12...v1.0.13) Fix some issues w/ Checkstyle configuration. We left the option to turn it off out.
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v0.1.0 (#15) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `0.0.0` -> `0.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.0/compatibility-slim/0.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.0/confidence-slim/0.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v0.1.1 (#22) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `0.1.0` -> `0.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.1/compatibility-slim/0.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.1/confidence-slim/0.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-optimization ### [`v0.1.1`](https://togithub.com/googleapis/java-optimization/blob/HEAD/CHANGELOG.md#​011-httpsgithubcomgoogleapisjava-optimizationcomparev010v011-2022-03-29) [Compare Source](https://togithub.com/googleapis/java-optimization/compare/v0.1.0...v0.1.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * docs: add async api code snippet (#25) * docs: add async api code snippet * fix lint * fix lint * use dataformat * fix import order * rename to inputUri * add pom * update gitignore * add pom in snapshot and install-without-bom * add indentation * reduce buckeet name length * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * rm region tag in test Co-authored-by: Owl Bot * docs: add a code snippet for the sync api (#24) * Added a sync api code snippet * samples: add long timeout sample (#27) * docs: add long timeout sample * fix lint * rm unused variable * fix package * 🦉 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 * docs: add get operation code snippet (#28) * docs: add get operation code snippet * add batch import * fix int * fix lint * fix import * rename method * add operation import * fix symbol * add multiline * 🦉 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 * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v0.1.2 (#32) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `0.1.1` -> `0.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.2/compatibility-slim/0.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/0.1.2/confidence-slim/0.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-optimization ### [`v0.1.2`](https://togithub.com/googleapis/java-optimization/blob/HEAD/CHANGELOG.md#​012-httpsgithubcomgoogleapisjava-optimizationcomparev011v012-2022-04-18) [Compare Source](https://togithub.com/googleapis/java-optimization/compare/v0.1.1...v0.1.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v25.2.0 (#37) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.1.0` -> `25.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/compatibility-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/confidence-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v25.3.0 (#43) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.2.0` -> `25.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/compatibility-slim/25.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/confidence-slim/25.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1 (#48) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `0.1.2` -> `1.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/compatibility-slim/0.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/confidence-slim/0.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#50) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.0 (#62) * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.0 * 🦉 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 * chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#64) * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 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 * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.2 (#75) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.0` -> `1.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.2/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.2/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.3 (#81) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.2` -> `1.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.3/compatibility-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.3/confidence-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.4 (#85) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.3` -> `1.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.4/compatibility-slim/1.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.4/confidence-slim/1.1.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.5 (#89) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.4` -> `1.1.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.5/compatibility-slim/1.1.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.5/confidence-slim/1.1.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-optimization ### [`v1.1.5`](https://togithub.com/googleapis/java-optimization/blob/HEAD/CHANGELOG.md#​115-httpsgithubcomgoogleapisjava-optimizationcomparev114v115-2022-08-04) [Compare Source](https://togithub.com/googleapis/java-optimization/compare/v1.1.4...v1.1.5) ##### Dependencies - update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#​86](https://togithub.com/googleapis/java-optimization/issues/86)) ([2474353](https://togithub.com/googleapis/java-optimization/commit/24743539405212de7c77ff3e0b825c4403554445))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.6 (#93) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.5` -> `1.1.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.6/compatibility-slim/1.1.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.6/confidence-slim/1.1.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.7 (#98) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.6` -> `1.1.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.7/compatibility-slim/1.1.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.7/confidence-slim/1.1.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#99) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#102) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.8 (#105) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.7` -> `1.1.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.8/compatibility-slim/1.1.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.8/confidence-slim/1.1.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-optimization ### [`v1.1.8`](https://togithub.com/googleapis/java-optimization/blob/HEAD/CHANGELOG.md#​118-httpsgithubcomgoogleapisjava-optimizationcomparev117v118-2022-09-06) [Compare Source](https://togithub.com/googleapis/java-optimization/compare/v1.1.7...v1.1.8) ##### Dependencies - Update dependency com.google.cloud ([4282317](https://togithub.com/googleapis/java-optimization/commit/4282317cd31b35a0ebc725b79d3b9266ae3baa9f))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.9 (#110) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.8` -> `1.1.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.9/compatibility-slim/1.1.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.9/confidence-slim/1.1.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.10 (#115) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.9` -> `1.1.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.10/compatibility-slim/1.1.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.10/confidence-slim/1.1.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#117) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.11 (#120) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.10` -> `1.1.11` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.11/compatibility-slim/1.1.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.11/confidence-slim/1.1.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-optimization ### [`v1.1.11`](https://togithub.com/googleapis/java-optimization/blob/HEAD/CHANGELOG.md#​1111-httpsgithubcomgoogleapisjava-optimizationcomparev1110v1111-2022-09-20) [Compare Source](https://togithub.com/googleapis/java-optimization/compare/v1.1.10...v1.1.11) ##### Dependencies - Update dependency com.google.cloud:google-cloud-storage to v2.12.0 ([#​116](https://togithub.com/googleapis/java-optimization/issues/116)) ([8d5a9c8](https://togithub.com/googleapis/java-optimization/commit/8d5a9c827c5e6c3365daff6c3b129668ce016e1e))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.13 (#127) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.11` -> `1.1.13` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.13/compatibility-slim/1.1.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.13/confidence-slim/1.1.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#132) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1.1.14 (#134) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `1.1.13` -> `1.1.14` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.14/compatibility-slim/1.1.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.1.14/confidence-slim/1.1.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 (#148) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.3` -> `26.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/compatibility-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/confidence-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). * Update pom.xml * Update pom.xml * Update pom.xml Co-authored-by: Neenu1995 Co-authored-by: WhiteSource Renovate Co-authored-by: WhiteSource Renovate Co-authored-by: changsongd <101151583+changsongd@users.noreply.github.com> Co-authored-by: Owl Bot --- optimization/snippets/pom.xml | 65 +++++++++++++ .../snippets/resources/sync_request.textproto | 64 +++++++++++++ .../com/example/optimizationai/AsyncApi.java | 85 +++++++++++++++++ .../example/optimizationai/GetOperation.java | 57 ++++++++++++ .../com/example/optimizationai/SyncApi.java | 57 ++++++++++++ .../SyncApiWithLongTimeout.java | 66 +++++++++++++ .../example/optimizationai/AsyncApiTest.java | 93 +++++++++++++++++++ .../optimizationai/GetOperationTest.java | 67 +++++++++++++ .../example/optimizationai/SyncApiTest.java | 57 ++++++++++++ .../SyncApiWithLongTimeoutTest.java | 57 ++++++++++++ 10 files changed, 668 insertions(+) create mode 100644 optimization/snippets/pom.xml create mode 100644 optimization/snippets/resources/sync_request.textproto create mode 100644 optimization/snippets/src/main/java/com/example/optimizationai/AsyncApi.java create mode 100644 optimization/snippets/src/main/java/com/example/optimizationai/GetOperation.java create mode 100644 optimization/snippets/src/main/java/com/example/optimizationai/SyncApi.java create mode 100644 optimization/snippets/src/main/java/com/example/optimizationai/SyncApiWithLongTimeout.java create mode 100644 optimization/snippets/src/test/java/com/example/optimizationai/AsyncApiTest.java create mode 100644 optimization/snippets/src/test/java/com/example/optimizationai/GetOperationTest.java create mode 100644 optimization/snippets/src/test/java/com/example/optimizationai/SyncApiTest.java create mode 100644 optimization/snippets/src/test/java/com/example/optimizationai/SyncApiWithLongTimeoutTest.java diff --git a/optimization/snippets/pom.xml b/optimization/snippets/pom.xml new file mode 100644 index 00000000000..a8d13e8bab5 --- /dev/null +++ b/optimization/snippets/pom.xml @@ -0,0 +1,65 @@ + + + 4.0.0 + com.example.optimization + optimization-ai-snippets + pom + Google Cloud Fleet Routing Samples Parent + https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/optimization + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + libraries-bom + 26.1.4 + pom + import + + + + + + + com.google.cloud + google-cloud-optimization + 1.1.14 + + + com.google.cloud + google-cloud-storage + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + diff --git a/optimization/snippets/resources/sync_request.textproto b/optimization/snippets/resources/sync_request.textproto new file mode 100644 index 00000000000..d1026f95eb0 --- /dev/null +++ b/optimization/snippets/resources/sync_request.textproto @@ -0,0 +1,64 @@ +# proto-file: google3/google/cloud/optimization/v1/fleet_routing.proto +# proto-message: OptimizeToursRequest +model { + shipments { + pickups { + arrival_location { latitude: 48.874507 longitude: 2.30361 } + time_windows { + start_time { seconds: 1000 } + end_time { seconds: 2000 } + } + duration { seconds: 150 } + } + deliveries { + arrival_location { latitude: 48.880942 longitude: 2.323866 } + time_windows { + start_time { seconds: 3000 } + end_time { seconds: 4000 } + } + duration: { seconds: 250 } + } + load_demands { + key: "weight" + value: { amount: 10 } + } + } + shipments { + pickups { + arrival_location { latitude: 48.880943 longitude: 2.323867 } + time_windows { + start_time { seconds: 1001 } + end_time { seconds: 2001 } + } + duration { seconds: 151 } + } + deliveries { + arrival_location { latitude: 48.880940 longitude: 2.323844 } + time_windows { + start_time { seconds: 3001 } + end_time { seconds: 4001 } + } + duration { seconds: 251 } + } + load_demands { + key: "weight" + value: { amount: 20 } + } + } + vehicles { + start_location { latitude: 48.863102 longitude: 2.341204 } + end_location { latitude: 48.863110 longitude: 2.341205 } + load_limits { + key: "weight" + value: { max_load: 50 } + } + } + vehicles { + start_location { latitude: 48.863112 longitude: 2.341214 } + end_location { latitude: 48.863120 longitude: 2.341215 } + load_limits { + key: "weight" + value: { max_load: 60 } + } + } + } \ No newline at end of file diff --git a/optimization/snippets/src/main/java/com/example/optimizationai/AsyncApi.java b/optimization/snippets/src/main/java/com/example/optimizationai/AsyncApi.java new file mode 100644 index 00000000000..97430d34720 --- /dev/null +++ b/optimization/snippets/src/main/java/com/example/optimizationai/AsyncApi.java @@ -0,0 +1,85 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.optimizationai; + +// [START cloudoptimization_async_api] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.optimization.v1.AsyncModelMetadata; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig; +import com.google.cloud.optimization.v1.BatchOptimizeToursResponse; +import com.google.cloud.optimization.v1.DataFormat; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.GcsDestination; +import com.google.cloud.optimization.v1.GcsSource; +import com.google.cloud.optimization.v1.InputConfig; +import com.google.cloud.optimization.v1.OutputConfig; + +/** + * This is an example to send a request to Cloud Fleet Routing asynchronous API via Java API Client. + * A sample async_request_java.textproto file and a sample request_model_java.json file can be found + * in the resources folder. + */ +public class AsyncApi { + public static void callAsyncApi() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectParent = "projects/{YOUR_GCP_PROJECT_ID}"; + String inputUri = "gs://YOUR_GCS_PATH"; + String outputUri = "gs://YOUR_SOLUTION_PATH"; + callAsyncApi(projectParent, inputUri, outputUri); + } + + public static void callAsyncApi(String projectParent, String inputUri, String outputUri) + throws Exception { + GcsSource gcsSource = GcsSource.newBuilder().setUri(inputUri).build(); + InputConfig inputConfig = + InputConfig.newBuilder().setGcsSource(gcsSource).setDataFormat(DataFormat.JSON).build(); + GcsDestination gcsDestination = GcsDestination.newBuilder().setUri(outputUri).build(); + OutputConfig outputConfig = + OutputConfig.newBuilder() + .setGcsDestination(gcsDestination) + .setDataFormat(DataFormat.JSON) + .build(); + + AsyncModelConfig asyncModelConfig = + AsyncModelConfig.newBuilder() + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + .build(); + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent(projectParent) + .addModelConfigs(asyncModelConfig) + .build(); + + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(); + OperationFuture response = + fleetRoutingClient.batchOptimizeToursAsync(request); + System.out.format("the response name: %s\n", response.getInitialFuture().get().getName()); + + // Block to wait for the job to finish. + response.getPollingFuture().get(); + if (response.getMetadata().get().getState() == AsyncModelMetadata.State.SUCCEEDED) { + // Code to do your stuff + System.out.println("Job finished successfully."); + } else { + System.out.println( + "Job failed with message:" + response.getPollingFuture().get().getErrorMessage()); + } + } +} +// [END cloudoptimization_async_api] diff --git a/optimization/snippets/src/main/java/com/example/optimizationai/GetOperation.java b/optimization/snippets/src/main/java/com/example/optimizationai/GetOperation.java new file mode 100644 index 00000000000..6a6e8fd0ece --- /dev/null +++ b/optimization/snippets/src/main/java/com/example/optimizationai/GetOperation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +// [START cloudoptimization_get_operation] +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.longrunning.Operation; +import java.io.IOException; + +class GetOperation { + + static void getOperation() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String operationFullId = "projects/[projectId]/operations/[operationId]"; + getOperation(operationFullId); + } + + // Get the status of an operation + static void getOperation(String operationFullId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (FleetRoutingClient client = FleetRoutingClient.create()) { + // Get the latest state of a long-running operation. + Operation operation = client.getOperationsClient().getOperation(operationFullId); + + // Display operation details. + System.out.println("Operation details:"); + System.out.format("\tName: %s\n", operation.getName()); + System.out.format("\tMetadata Type Url: %s\n", operation.getMetadata().getTypeUrl()); + System.out.format("\tDone: %s\n", operation.getDone()); + if (operation.hasResponse()) { + System.out.format("\tResponse Type Url: %s\n", operation.getResponse().getTypeUrl()); + } + if (operation.hasError()) { + System.out.println("\tResponse:"); + System.out.format("\t\tError code: %s\n", operation.getError().getCode()); + System.out.format("\t\tError message: %s\n", operation.getError().getMessage()); + } + } + } +} +// [END cloudoptimization_get_operation] diff --git a/optimization/snippets/src/main/java/com/example/optimizationai/SyncApi.java b/optimization/snippets/src/main/java/com/example/optimizationai/SyncApi.java new file mode 100644 index 00000000000..5e73344b17b --- /dev/null +++ b/optimization/snippets/src/main/java/com/example/optimizationai/SyncApi.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +// [START cloudoptimization_sync_api] + +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.OptimizeToursRequest; +import com.google.cloud.optimization.v1.OptimizeToursResponse; +import com.google.protobuf.Duration; +import com.google.protobuf.TextFormat; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; + +/** + * This is an example to send a request to Cloud Fleet Routing synchronous API via Java API Client. + * A sample sync_request.textproto file can be found in the resources folder. + */ +public class SyncApi { + public static void callSyncApi() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectParent = "projects/{YOUR_GCP_PROJECT_ID}"; + String modelPath = "YOUR_MODEL_PATH"; + callSyncApi(projectParent, modelPath); + } + + public static void callSyncApi(String projectParent, String modelPath) throws Exception { + int timeoutSeconds = 100; + InputStream modelInputstream = new FileInputStream(modelPath); + Reader modelInputStreamReader = new InputStreamReader(modelInputstream); + OptimizeToursRequest.Builder requestBuilder = + OptimizeToursRequest.newBuilder() + .setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds).build()) + .setParent(projectParent); + TextFormat.getParser().merge(modelInputStreamReader, requestBuilder); + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(); + OptimizeToursResponse response = fleetRoutingClient.optimizeTours(requestBuilder.build()); + System.out.println(response.toString()); + } +} +// [END cloudoptimization_sync_api] diff --git a/optimization/snippets/src/main/java/com/example/optimizationai/SyncApiWithLongTimeout.java b/optimization/snippets/src/main/java/com/example/optimizationai/SyncApiWithLongTimeout.java new file mode 100644 index 00000000000..152fd08e901 --- /dev/null +++ b/optimization/snippets/src/main/java/com/example/optimizationai/SyncApiWithLongTimeout.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +// [START cloudoptimization_long_timeout] + +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.FleetRoutingSettings; +import com.google.cloud.optimization.v1.OptimizeToursRequest; +import com.google.cloud.optimization.v1.OptimizeToursResponse; +import com.google.protobuf.Duration; +import com.google.protobuf.TextFormat; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; + +/** + * This is an example to send a request to Cloud Fleet Routing synchronous API via Java API Client. + */ +public class SyncApiWithLongTimeout { + public static void longTimeout() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectParent = "projects/{YOUR_GCP_PROJECT_ID}"; + String modelPath = "YOUR_MODEL_PATH"; + longTimeout(projectParent, modelPath); + } + + public static void longTimeout(String projectParent, String modelPath) throws Exception { + int timeoutSeconds = 100; + InputStream modelInputstream = new FileInputStream(modelPath); + Reader modelInputStreamReader = new InputStreamReader(modelInputstream); + OptimizeToursRequest.Builder requestBuilder = + OptimizeToursRequest.newBuilder() + .setTimeout(Duration.newBuilder().setSeconds(timeoutSeconds).build()) + .setParent(projectParent); + TextFormat.getParser().merge(modelInputStreamReader, requestBuilder); + + // Checks the gRPC connection every 5 mins and keeps it alive. + FleetRoutingClient fleetRoutingClientClient = + FleetRoutingClient.create( + FleetRoutingSettings.newBuilder() + .setTransportChannelProvider( + FleetRoutingSettings.defaultGrpcTransportProviderBuilder() + .setKeepAliveTime(org.threeten.bp.Duration.ofSeconds(300)) + .build()) + .build()); + OptimizeToursResponse response = fleetRoutingClientClient.optimizeTours(requestBuilder.build()); + System.out.println(response.toString()); + } +} +// [END cloudoptimization_long_timeout] diff --git a/optimization/snippets/src/test/java/com/example/optimizationai/AsyncApiTest.java b/optimization/snippets/src/test/java/com/example/optimizationai/AsyncApiTest.java new file mode 100644 index 00000000000..058b46a3b9f --- /dev/null +++ b/optimization/snippets/src/test/java/com/example/optimizationai/AsyncApiTest.java @@ -0,0 +1,93 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.optimizationai; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.paging.Page; +import com.google.cloud.storage.Blob; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.Storage; +import com.google.cloud.storage.StorageOptions; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** Tests for AsyncApi sample. */ +public class AsyncApiTest { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_PARENT = String.format("projects/%s", PROJECT_ID); + private static final String BUCKET_NAME = + String.format("optimizationai-test-%s", UUID.randomUUID()); + private static final String INPUT_URI = + "gs://cloud-samples-data/optimization-ai/async_request_model.json"; + private static final String BATCH_OUTPUT_URI = + String.format("gs://%s/code_snippets_test_output.json", BUCKET_NAME); + + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static void cleanUpBucket() { + Storage storage = StorageOptions.getDefaultInstance().getService(); + Page blobs = storage.list(BUCKET_NAME, Storage.BlobListOption.currentDirectory()); + + deleteDirectory(storage, blobs); + } + + private static void deleteDirectory(Storage storage, Page blobs) { + for (Blob blob : blobs.iterateAll()) { + if (!blob.delete()) { + Page subBlobs = + storage.list( + BUCKET_NAME, + Storage.BlobListOption.currentDirectory(), + Storage.BlobListOption.prefix(blob.getName())); + + deleteDirectory(storage, subBlobs); + } + } + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + + Storage storage = StorageOptions.getDefaultInstance().getService(); + storage.create(BucketInfo.of(BUCKET_NAME)); + } + + @After + public void tearDown() { + cleanUpBucket(); + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testAsyncApi() throws Exception { + AsyncApi.callAsyncApi(PROJECT_PARENT, INPUT_URI, BATCH_OUTPUT_URI); + String got = bout.toString(); + assertThat(got).contains("Job"); + } +} diff --git a/optimization/snippets/src/test/java/com/example/optimizationai/GetOperationTest.java b/optimization/snippets/src/test/java/com/example/optimizationai/GetOperationTest.java new file mode 100644 index 00000000000..32ef2cb0528 --- /dev/null +++ b/optimization/snippets/src/test/java/com/example/optimizationai/GetOperationTest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.optimization.v1.AsyncModelMetadata; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.BatchOptimizeToursResponse; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** Tests for GetOperation sample. */ +public class GetOperationTest { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_PARENT = String.format("projects/%s", PROJECT_ID); + + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testSyncApi() throws Exception { + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(); + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder().setParent(PROJECT_PARENT).build(); + OperationFuture response = + fleetRoutingClient.batchOptimizeToursAsync(request); + + GetOperation.getOperation(response.getInitialFuture().get().getName()); + String got = bout.toString(); + assertThat(got).contains("operations"); + } +} diff --git a/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiTest.java b/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiTest.java new file mode 100644 index 00000000000..e663a924584 --- /dev/null +++ b/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** Tests for SyncApi sample. */ +public class SyncApiTest { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_PARENT = String.format("projects/%s", PROJECT_ID); + private static final String MODEL_PATH = "resources/sync_request.textproto"; + + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testSyncApi() throws Exception { + SyncApi.callSyncApi(PROJECT_PARENT, MODEL_PATH); + String got = bout.toString(); + assertThat(got).contains("routes"); + } +} diff --git a/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiWithLongTimeoutTest.java b/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiWithLongTimeoutTest.java new file mode 100644 index 00000000000..0dc7b1125fa --- /dev/null +++ b/optimization/snippets/src/test/java/com/example/optimizationai/SyncApiWithLongTimeoutTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.optimizationai; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** Tests for SyncApiWithLongTimeout sample. */ +public class SyncApiWithLongTimeoutTest { + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_PARENT = String.format("projects/%s", PROJECT_ID); + private static final String MODEL_PATH = "resources/sync_request.textproto"; + + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + System.out.flush(); + System.setOut(originalPrintStream); + } + + @Test + public void testSyncApi() throws Exception { + SyncApiWithLongTimeout.longTimeout(PROJECT_PARENT, MODEL_PATH); + String got = bout.toString(); + assertThat(got).contains("routes"); + } +}