From f05e125feb26b8f59f5f2fa474b43e8618063494 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Jul 2022 17:04:11 +0200 Subject: [PATCH 1/8] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.0 (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.3.0` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/confidence-slim/3.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-networkconnectivity). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 899802a3..c24814a3 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.3.0 + 3.4.0 From 9659a343b1890eeeeb7c8daac94e87ade11a1b79 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 19:22:15 +0200 Subject: [PATCH 2/8] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.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-networkconnectivity). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index 542bb586..29560c32 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true From ac05bef242c05e7856b58bc23d60237f43b2c74c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Jul 2022 21:22:12 +0200 Subject: [PATCH 3/8] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.2 (#276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![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-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.5.1` -> `1.5.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.2/compatibility-slim/1.5.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.2/confidence-slim/1.5.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.5.2`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​152-httpsgithubcomgoogleapisjava-shared-configcomparev151v152-2022-07-25) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.5.1...v1.5.2) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v10 ([#​435](https://togithub.com/googleapis/java-shared-config/issues/435)) ([bfc8ce1](https://togithub.com/googleapis/java-shared-config/commit/bfc8ce1deca6292147d002d3afe22a09840aa5d6)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#​488](https://togithub.com/googleapis/java-shared-config/issues/488)) ([39b91ee](https://togithub.com/googleapis/java-shared-config/commit/39b91ee1283f0a5fbbe63e8bfd1ec97ab4ab377e)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#​489](https://togithub.com/googleapis/java-shared-config/issues/489)) ([cc3bcfa](https://togithub.com/googleapis/java-shared-config/commit/cc3bcfa2d6717441a8d5b5048fa78c2cf7aabf2b))
--- ### 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-networkconnectivity). --- google-cloud-networkconnectivity-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-networkconnectivity-bom/pom.xml b/google-cloud-networkconnectivity-bom/pom.xml index dd3ad676..d8c6a84b 100644 --- a/google-cloud-networkconnectivity-bom/pom.xml +++ b/google-cloud-networkconnectivity-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.2 Google Network Connectivity Center BOM diff --git a/pom.xml b/pom.xml index c24814a3..a6e28287 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.2 From e9f7967203960f822c65b58d272d3a30196fbcb4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:28:32 +0000 Subject: [PATCH 4/8] chore(bazel): update protobuf to v3.21.3 (#275) - [ ] Regenerate this pull request now. chore(bazel): update gax-java to 2.18.4 PiperOrigin-RevId: 463115700 Source-Link: https://github.com/googleapis/googleapis/commit/52130a9c3c289e6bc4ab1784bdde6081abdf3dd9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a4d9d9bb3afb20b0f5fa4f5d9f6740b1d0eb19a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9 --- .../v1/LocationMetadata.java | 4 +- .../SyncCreateSetCredentialsProvider.java | 41 +++++++++++++ .../create/SyncCreateSetEndpoint.java | 38 ++++++++++++ .../createhub/AsyncCreateHub.java | 50 ++++++++++++++++ .../createhub/AsyncCreateHubLRO.java | 51 ++++++++++++++++ .../createhub/SyncCreateHub.java | 46 ++++++++++++++ .../SyncCreateHubLocationnameHubString.java | 41 +++++++++++++ .../SyncCreateHubStringHubString.java | 41 +++++++++++++ .../createspoke/AsyncCreateSpoke.java | 50 ++++++++++++++++ .../createspoke/AsyncCreateSpokeLRO.java | 51 ++++++++++++++++ .../createspoke/SyncCreateSpoke.java | 46 ++++++++++++++ ...yncCreateSpokeLocationnameSpokeString.java | 41 +++++++++++++ .../SyncCreateSpokeStringSpokeString.java | 41 +++++++++++++ .../deletehub/AsyncDeleteHub.java | 47 +++++++++++++++ .../deletehub/AsyncDeleteHubLRO.java | 49 +++++++++++++++ .../deletehub/SyncDeleteHub.java | 44 ++++++++++++++ .../deletehub/SyncDeleteHubHubname.java | 39 ++++++++++++ .../deletehub/SyncDeleteHubString.java | 39 ++++++++++++ .../deletespoke/AsyncDeleteSpoke.java | 47 +++++++++++++++ .../deletespoke/AsyncDeleteSpokeLRO.java | 49 +++++++++++++++ .../deletespoke/SyncDeleteSpoke.java | 44 ++++++++++++++ .../deletespoke/SyncDeleteSpokeSpokename.java | 39 ++++++++++++ .../deletespoke/SyncDeleteSpokeString.java | 39 ++++++++++++ .../hubserviceclient/gethub/AsyncGetHub.java | 44 ++++++++++++++ .../hubserviceclient/gethub/SyncGetHub.java | 41 +++++++++++++ .../gethub/SyncGetHubHubname.java | 39 ++++++++++++ .../gethub/SyncGetHubString.java | 39 ++++++++++++ .../getspoke/AsyncGetSpoke.java | 46 ++++++++++++++ .../getspoke/SyncGetSpoke.java | 43 +++++++++++++ .../getspoke/SyncGetSpokeSpokename.java | 39 ++++++++++++ .../getspoke/SyncGetSpokeString.java | 39 ++++++++++++ .../listhubs/AsyncListHubs.java | 52 ++++++++++++++++ .../listhubs/AsyncListHubsPaged.java | 60 +++++++++++++++++++ .../listhubs/SyncListHubs.java | 49 +++++++++++++++ .../listhubs/SyncListHubsLocationname.java | 41 +++++++++++++ .../listhubs/SyncListHubsString.java | 41 +++++++++++++ .../listspokes/AsyncListSpokes.java | 52 ++++++++++++++++ .../listspokes/AsyncListSpokesPaged.java | 60 +++++++++++++++++++ .../listspokes/SyncListSpokes.java | 49 +++++++++++++++ .../SyncListSpokesLocationname.java | 41 +++++++++++++ .../listspokes/SyncListSpokesString.java | 41 +++++++++++++ .../updatehub/AsyncUpdateHub.java | 49 +++++++++++++++ .../updatehub/AsyncUpdateHubLRO.java | 50 ++++++++++++++++ .../updatehub/SyncUpdateHub.java | 45 ++++++++++++++ .../updatehub/SyncUpdateHubHubFieldmask.java | 40 +++++++++++++ .../updatespoke/AsyncUpdateSpoke.java | 49 +++++++++++++++ .../updatespoke/AsyncUpdateSpokeLRO.java | 50 ++++++++++++++++ .../updatespoke/SyncUpdateSpoke.java | 45 ++++++++++++++ .../SyncUpdateSpokeSpokeFieldmask.java | 40 +++++++++++++ .../hubservicesettings/gethub/SyncGetHub.java | 45 ++++++++++++++ .../gethub/SyncGetHub.java | 45 ++++++++++++++ .../SyncCreateSetCredentialsProvider.java | 41 +++++++++++++ .../create/SyncCreateSetEndpoint.java | 38 ++++++++++++ .../createhub/AsyncCreateHub.java | 50 ++++++++++++++++ .../createhub/AsyncCreateHubLRO.java | 51 ++++++++++++++++ .../createhub/SyncCreateHub.java | 46 ++++++++++++++ .../SyncCreateHubLocationnameHubString.java | 41 +++++++++++++ .../SyncCreateHubStringHubString.java | 41 +++++++++++++ .../createspoke/AsyncCreateSpoke.java | 50 ++++++++++++++++ .../createspoke/AsyncCreateSpokeLRO.java | 51 ++++++++++++++++ .../createspoke/SyncCreateSpoke.java | 46 ++++++++++++++ ...yncCreateSpokeLocationnameSpokeString.java | 41 +++++++++++++ .../SyncCreateSpokeStringSpokeString.java | 41 +++++++++++++ .../deletehub/AsyncDeleteHub.java | 47 +++++++++++++++ .../deletehub/AsyncDeleteHubLRO.java | 49 +++++++++++++++ .../deletehub/SyncDeleteHub.java | 44 ++++++++++++++ .../deletehub/SyncDeleteHubHubname.java | 39 ++++++++++++ .../deletehub/SyncDeleteHubString.java | 39 ++++++++++++ .../deletespoke/AsyncDeleteSpoke.java | 47 +++++++++++++++ .../deletespoke/AsyncDeleteSpokeLRO.java | 49 +++++++++++++++ .../deletespoke/SyncDeleteSpoke.java | 44 ++++++++++++++ .../deletespoke/SyncDeleteSpokeSpokename.java | 39 ++++++++++++ .../deletespoke/SyncDeleteSpokeString.java | 39 ++++++++++++ .../hubserviceclient/gethub/AsyncGetHub.java | 44 ++++++++++++++ .../hubserviceclient/gethub/SyncGetHub.java | 41 +++++++++++++ .../gethub/SyncGetHubHubname.java | 39 ++++++++++++ .../gethub/SyncGetHubString.java | 39 ++++++++++++ .../getspoke/AsyncGetSpoke.java | 46 ++++++++++++++ .../getspoke/SyncGetSpoke.java | 43 +++++++++++++ .../getspoke/SyncGetSpokeSpokename.java | 39 ++++++++++++ .../getspoke/SyncGetSpokeString.java | 39 ++++++++++++ .../listhubs/AsyncListHubs.java | 52 ++++++++++++++++ .../listhubs/AsyncListHubsPaged.java | 60 +++++++++++++++++++ .../listhubs/SyncListHubs.java | 49 +++++++++++++++ .../listhubs/SyncListHubsLocationname.java | 41 +++++++++++++ .../listhubs/SyncListHubsString.java | 41 +++++++++++++ .../listspokes/AsyncListSpokes.java | 52 ++++++++++++++++ .../listspokes/AsyncListSpokesPaged.java | 60 +++++++++++++++++++ .../listspokes/SyncListSpokes.java | 49 +++++++++++++++ .../SyncListSpokesLocationname.java | 41 +++++++++++++ .../listspokes/SyncListSpokesString.java | 41 +++++++++++++ .../updatehub/AsyncUpdateHub.java | 49 +++++++++++++++ .../updatehub/AsyncUpdateHubLRO.java | 50 ++++++++++++++++ .../updatehub/SyncUpdateHub.java | 45 ++++++++++++++ .../updatehub/SyncUpdateHubHubFieldmask.java | 40 +++++++++++++ .../updatespoke/AsyncUpdateSpoke.java | 49 +++++++++++++++ .../updatespoke/AsyncUpdateSpokeLRO.java | 50 ++++++++++++++++ .../updatespoke/SyncUpdateSpoke.java | 45 ++++++++++++++ .../SyncUpdateSpokeSpokeFieldmask.java | 40 +++++++++++++ .../hubservicesettings/gethub/SyncGetHub.java | 45 ++++++++++++++ .../gethub/SyncGetHub.java | 45 ++++++++++++++ 101 files changed, 4496 insertions(+), 2 deletions(-) create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubStringHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubHubname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/AsyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubHubname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/AsyncGetSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubs.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubsPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubs.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokes.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokesPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokes.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservicesettings/gethub/SyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1/stub/hubservicestubsettings/gethub/SyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubStringHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubHubname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/AsyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubHubname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/AsyncGetSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubs.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubsPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubs.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokes.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokesPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokes.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesLocationname.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesString.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpoke.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubservicesettings/gethub/SyncGetHub.java create mode 100644 samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/stub/hubservicestubsettings/gethub/SyncGetHub.java diff --git a/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LocationMetadata.java b/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LocationMetadata.java index 86f33e9f..2863a3ab 100644 --- a/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LocationMetadata.java +++ b/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LocationMetadata.java @@ -775,8 +775,8 @@ public int getLocationFeaturesValue(int index) { * repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; * * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of locationFeatures at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for locationFeatures to set. * @return This builder for chaining. */ public Builder setLocationFeaturesValue(int index, int value) { diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..4bdfb33d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..ee46a923 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHub.java new file mode 100644 index 00000000..6c329fad --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHub.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createhub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateHub { + + public static void main(String[] args) throws Exception { + asyncCreateHub(); + } + + public static void asyncCreateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createhub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHubLRO.java new file mode 100644 index 00000000..45185c6e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHubLRO.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; + +public class AsyncCreateHubLRO { + + public static void main(String[] args) throws Exception { + asyncCreateHubLRO(); + } + + public static void asyncCreateHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHub.java new file mode 100644 index 00000000..c0ae57fb --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHub.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createhub_sync] +import com.google.cloud.networkconnectivity.v1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncCreateHub { + + public static void main(String[] args) throws Exception { + syncCreateHub(); + } + + public static void syncCreateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.createHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createhub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java new file mode 100644 index 00000000..6cd04d36 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncCreateHubLocationnameHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubLocationnameHubString(); + } + + public static void syncCreateHubLocationnameHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubStringHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubStringHubString.java new file mode 100644 index 00000000..0e662bd0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubStringHubString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncCreateHubStringHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubStringHubString(); + } + + public static void syncCreateHubStringHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpoke.java new file mode 100644 index 00000000..ab671a24 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpoke.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.longrunning.Operation; + +public class AsyncCreateSpoke { + + public static void main(String[] args) throws Exception { + asyncCreateSpoke(); + } + + public static void asyncCreateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java new file mode 100644 index 00000000..051c8b96 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class AsyncCreateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSpokeLRO(); + } + + public static void asyncCreateSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpoke.java new file mode 100644 index 00000000..9262500d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpoke.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_sync] +import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncCreateSpoke { + + public static void main(String[] args) throws Exception { + syncCreateSpoke(); + } + + public static void syncCreateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.createSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java new file mode 100644 index 00000000..9572f31f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_locationnamespokestring_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncCreateSpokeLocationnameSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeLocationnameSpokeString(); + } + + public static void syncCreateSpokeLocationnameSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_locationnamespokestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java new file mode 100644 index 00000000..b7a9e696 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_stringspokestring_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncCreateSpokeStringSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeStringSpokeString(); + } + + public static void syncCreateSpokeStringSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_stringspokestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHub.java new file mode 100644 index 00000000..77cf7fd3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHub.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletehub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteHub { + + public static void main(String[] args) throws Exception { + asyncDeleteHub(); + } + + public static void asyncDeleteHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteHubCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletehub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java new file mode 100644 index 00000000..2d564c24 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletehub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteHubLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteHubLRO(); + } + + public static void asyncDeleteHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteHubOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletehub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHub.java new file mode 100644 index 00000000..05a90b6d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHub.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletehub_sync] +import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHub { + + public static void main(String[] args) throws Exception { + syncDeleteHub(); + } + + public static void syncDeleteHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletehub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubHubname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubHubname.java new file mode 100644 index 00000000..6ebacdd1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubHubname.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletehub_hubname_sync] +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubHubname { + + public static void main(String[] args) throws Exception { + syncDeleteHubHubname(); + } + + public static void syncDeleteHubHubname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletehub_hubname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubString.java new file mode 100644 index 00000000..d9cb608d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletehub/SyncDeleteHubString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletehub_string_sync] +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubString { + + public static void main(String[] args) throws Exception { + syncDeleteHubString(); + } + + public static void syncDeleteHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletehub_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java new file mode 100644 index 00000000..db59f9cc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletespoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + asyncDeleteSpoke(); + } + + public static void asyncDeleteSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletespoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java new file mode 100644 index 00000000..d99e0da1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletespoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.SpokeName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSpokeLRO(); + } + + public static void asyncDeleteSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteSpokeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletespoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpoke.java new file mode 100644 index 00000000..aec30d43 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpoke.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletespoke_sync] +import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + syncDeleteSpoke(); + } + + public static void syncDeleteSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletespoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java new file mode 100644 index 00000000..9fa1415f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletespoke_spokename_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeSpokename(); + } + + public static void syncDeleteSpokeSpokename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletespoke_spokename_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java new file mode 100644 index 00000000..5d181d95 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_deletespoke_string_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeString { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeString(); + } + + public static void syncDeleteSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_deletespoke_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/AsyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/AsyncGetHub.java new file mode 100644 index 00000000..60e2932c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/AsyncGetHub.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_gethub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; + +public class AsyncGetHub { + + public static void main(String[] args) throws Exception { + asyncGetHub(); + } + + public static void asyncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + ApiFuture future = hubServiceClient.getHubCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_gethub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHub.java new file mode 100644 index 00000000..ad933292 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHub.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_gethub_sync] +import com.google.cloud.networkconnectivity.v1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + Hub response = hubServiceClient.getHub(request); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_gethub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubHubname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubHubname.java new file mode 100644 index 00000000..9cf29887 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubHubname.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_gethub_hubname_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; + +public class SyncGetHubHubname { + + public static void main(String[] args) throws Exception { + syncGetHubHubname(); + } + + public static void syncGetHubHubname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_gethub_hubname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubString.java new file mode 100644 index 00000000..5d9aae8c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/gethub/SyncGetHubString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_gethub_string_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubName; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; + +public class SyncGetHubString { + + public static void main(String[] args) throws Exception { + syncGetHubString(); + } + + public static void syncGetHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_gethub_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/AsyncGetSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/AsyncGetSpoke.java new file mode 100644 index 00000000..620e4463 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/AsyncGetSpoke.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_getspoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.SpokeName; + +public class AsyncGetSpoke { + + public static void main(String[] args) throws Exception { + asyncGetSpoke(); + } + + public static void asyncGetSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + ApiFuture future = hubServiceClient.getSpokeCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_getspoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpoke.java new file mode 100644 index 00000000..03832e7e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpoke.java @@ -0,0 +1,43 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_getspoke_sync] +import com.google.cloud.networkconnectivity.v1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.SpokeName; + +public class SyncGetSpoke { + + public static void main(String[] args) throws Exception { + syncGetSpoke(); + } + + public static void syncGetSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + Spoke response = hubServiceClient.getSpoke(request); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_getspoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java new file mode 100644 index 00000000..d05dca84 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_getspoke_spokename_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.SpokeName; + +public class SyncGetSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncGetSpokeSpokename(); + } + + public static void syncGetSpokeSpokename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_getspoke_spokename_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeString.java new file mode 100644 index 00000000..8d331c68 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/getspoke/SyncGetSpokeString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_getspoke_string_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.SpokeName; + +public class SyncGetSpokeString { + + public static void main(String[] args) throws Exception { + syncGetSpokeString(); + } + + public static void syncGetSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_getspoke_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubs.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubs.java new file mode 100644 index 00000000..0211d1b8 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubs.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listhubs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class AsyncListHubs { + + public static void main(String[] args) throws Exception { + asyncListHubs(); + } + + public static void asyncListHubs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listHubsPagedCallable().futureCall(request); + // Do something. + for (Hub element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listhubs_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubsPaged.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubsPaged.java new file mode 100644 index 00000000..a3577d4b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/AsyncListHubsPaged.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listhubs_paged_async] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListHubsPaged { + + public static void main(String[] args) throws Exception { + asyncListHubsPaged(); + } + + public static void asyncListHubsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHubsResponse response = hubServiceClient.listHubsCallable().call(request); + for (Hub element : response.getHubsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listhubs_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubs.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubs.java new file mode 100644 index 00000000..68c02c8b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubs.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listhubs_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncListHubs { + + public static void main(String[] args) throws Exception { + syncListHubs(); + } + + public static void syncListHubs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Hub element : hubServiceClient.listHubs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listhubs_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsLocationname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsLocationname.java new file mode 100644 index 00000000..dbccad6d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsLocationname.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listhubs_locationname_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncListHubsLocationname { + + public static void main(String[] args) throws Exception { + syncListHubsLocationname(); + } + + public static void syncListHubsLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listhubs_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsString.java new file mode 100644 index 00000000..d97c331a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listhubs/SyncListHubsString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listhubs_string_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; + +public class SyncListHubsString { + + public static void main(String[] args) throws Exception { + syncListHubsString(); + } + + public static void syncListHubsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listhubs_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokes.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokes.java new file mode 100644 index 00000000..0c3a20c5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokes.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listspokes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class AsyncListSpokes { + + public static void main(String[] args) throws Exception { + asyncListSpokes(); + } + + public static void asyncListSpokes() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listSpokesPagedCallable().futureCall(request); + // Do something. + for (Spoke element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listspokes_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokesPaged.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokesPaged.java new file mode 100644 index 00000000..969de725 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/AsyncListSpokesPaged.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listspokes_paged_async] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.common.base.Strings; + +public class AsyncListSpokesPaged { + + public static void main(String[] args) throws Exception { + asyncListSpokesPaged(); + } + + public static void asyncListSpokesPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request); + for (Spoke element : response.getSpokesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listspokes_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokes.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokes.java new file mode 100644 index 00000000..2f923d08 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokes.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listspokes_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncListSpokes { + + public static void main(String[] args) throws Exception { + syncListSpokes(); + } + + public static void syncListSpokes() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listspokes_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesLocationname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesLocationname.java new file mode 100644 index 00000000..1fd0f919 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesLocationname.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listspokes_locationname_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncListSpokesLocationname { + + public static void main(String[] args) throws Exception { + syncListSpokesLocationname(); + } + + public static void syncListSpokesLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listspokes_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesString.java new file mode 100644 index 00000000..0edfee90 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/listspokes/SyncListSpokesString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_listspokes_string_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.LocationName; +import com.google.cloud.networkconnectivity.v1.Spoke; + +public class SyncListSpokesString { + + public static void main(String[] args) throws Exception { + syncListSpokesString(); + } + + public static void syncListSpokesString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_listspokes_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHub.java new file mode 100644 index 00000000..990cd67f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHub.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatehub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHub { + + public static void main(String[] args) throws Exception { + asyncUpdateHub(); + } + + public static void asyncUpdateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatehub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java new file mode 100644 index 00000000..795f3454 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatehub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHubLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateHubLRO(); + } + + public static void asyncUpdateHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatehub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHub.java new file mode 100644 index 00000000..7f788f47 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatehub_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHub { + + public static void main(String[] args) throws Exception { + syncUpdateHub(); + } + + public static void syncUpdateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.updateHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatehub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java new file mode 100644 index 00000000..01dd40fc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java @@ -0,0 +1,40 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatehub_hubfieldmask_sync] +import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHubHubFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateHubHubFieldmask(); + } + + public static void syncUpdateHubHubFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Hub hub = Hub.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatehub_hubfieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java new file mode 100644 index 00000000..7acdbb41 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatespoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + asyncUpdateSpoke(); + } + + public static void asyncUpdateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatespoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java new file mode 100644 index 00000000..a6c86b7b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatespoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSpokeLRO(); + } + + public static void asyncUpdateSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatespoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpoke.java new file mode 100644 index 00000000..f928773e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpoke.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatespoke_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + syncUpdateSpoke(); + } + + public static void syncUpdateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.updateSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatespoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java new file mode 100644 index 00000000..f58902ae --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java @@ -0,0 +1,40 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubserviceclient_updatespoke_spokefieldmask_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1.Spoke; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpokeSpokeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSpokeSpokeFieldmask(); + } + + public static void syncUpdateSpokeSpokeFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Spoke spoke = Spoke.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get(); + } + } +} +// [END networkconnectivity_v1_generated_hubserviceclient_updatespoke_spokefieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservicesettings/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservicesettings/gethub/SyncGetHub.java new file mode 100644 index 00000000..3f3e1b58 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservicesettings/gethub/SyncGetHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.samples; + +// [START networkconnectivity_v1_generated_hubservicesettings_gethub_sync] +import com.google.cloud.networkconnectivity.v1.HubServiceSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HubServiceSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1_generated_hubservicesettings_gethub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/stub/hubservicestubsettings/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/stub/hubservicestubsettings/gethub/SyncGetHub.java new file mode 100644 index 00000000..44b97354 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/stub/hubservicestubsettings/gethub/SyncGetHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1.stub.samples; + +// [START networkconnectivity_v1_generated_hubservicestubsettings_gethub_sync] +import com.google.cloud.networkconnectivity.v1.stub.HubServiceStubSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HubServiceStubSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1_generated_hubservicestubsettings_gethub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..02788a62 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1alpha1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..71396ab4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_create_setendpoint_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1alpha1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHub.java new file mode 100644 index 00000000..6e2b7d34 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHub.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateHub { + + public static void main(String[] args) throws Exception { + asyncCreateHub(); + } + + public static void asyncCreateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHubLRO.java new file mode 100644 index 00000000..4f015352 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/AsyncCreateHubLRO.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; + +public class AsyncCreateHubLRO { + + public static void main(String[] args) throws Exception { + asyncCreateHubLRO(); + } + + public static void asyncCreateHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHub.java new file mode 100644 index 00000000..0f0cfdb1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHub.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncCreateHub { + + public static void main(String[] args) throws Exception { + syncCreateHub(); + } + + public static void syncCreateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.createHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java new file mode 100644 index 00000000..b85a2e83 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_locationnamehubstring_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncCreateHubLocationnameHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubLocationnameHubString(); + } + + public static void syncCreateHubLocationnameHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_locationnamehubstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubStringHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubStringHubString.java new file mode 100644 index 00000000..f8a9b04b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createhub/SyncCreateHubStringHubString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_stringhubstring_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncCreateHubStringHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubStringHubString(); + } + + public static void syncCreateHubStringHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createhub_stringhubstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpoke.java new file mode 100644 index 00000000..3105c5e5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpoke.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.longrunning.Operation; + +public class AsyncCreateSpoke { + + public static void main(String[] args) throws Exception { + asyncCreateSpoke(); + } + + public static void asyncCreateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java new file mode 100644 index 00000000..f67f956b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/AsyncCreateSpokeLRO.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class AsyncCreateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSpokeLRO(); + } + + public static void asyncCreateSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpoke.java new file mode 100644 index 00000000..e9892e98 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpoke.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_sync] +import com.google.cloud.networkconnectivity.v1alpha1.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncCreateSpoke { + + public static void main(String[] args) throws Exception { + syncCreateSpoke(); + } + + public static void syncCreateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.createSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java new file mode 100644 index 00000000..0b7b40da --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeLocationnameSpokeString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_locationnamespokestring_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncCreateSpokeLocationnameSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeLocationnameSpokeString(); + } + + public static void syncCreateSpokeLocationnameSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_locationnamespokestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java new file mode 100644 index 00000000..c1e2c156 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/createspoke/SyncCreateSpokeStringSpokeString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_stringspokestring_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncCreateSpokeStringSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeStringSpokeString(); + } + + public static void syncCreateSpokeStringSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_createspoke_stringspokestring_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHub.java new file mode 100644 index 00000000..3e8d5055 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHub.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteHub { + + public static void main(String[] args) throws Exception { + asyncDeleteHub(); + } + + public static void asyncDeleteHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteHubCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java new file mode 100644 index 00000000..3bdef483 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/AsyncDeleteHubLRO.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteHubLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteHubLRO(); + } + + public static void asyncDeleteHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteHubOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHub.java new file mode 100644 index 00000000..72c4bba0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHub.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHub { + + public static void main(String[] args) throws Exception { + syncDeleteHub(); + } + + public static void syncDeleteHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubHubname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubHubname.java new file mode 100644 index 00000000..263da65c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubHubname.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_hubname_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubHubname { + + public static void main(String[] args) throws Exception { + syncDeleteHubHubname(); + } + + public static void syncDeleteHubHubname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_hubname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubString.java new file mode 100644 index 00000000..c67e0613 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletehub/SyncDeleteHubString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubString { + + public static void main(String[] args) throws Exception { + syncDeleteHubString(); + } + + public static void syncDeleteHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletehub_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java new file mode 100644 index 00000000..0a2b31d5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpoke.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + asyncDeleteSpoke(); + } + + public static void asyncDeleteSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java new file mode 100644 index 00000000..e68fe3aa --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/AsyncDeleteSpokeLRO.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSpokeLRO(); + } + + public static void asyncDeleteSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteSpokeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpoke.java new file mode 100644 index 00000000..60ef478a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpoke.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_sync] +import com.google.cloud.networkconnectivity.v1alpha1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + syncDeleteSpoke(); + } + + public static void syncDeleteSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java new file mode 100644 index 00000000..90319586 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeSpokename.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_spokename_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeSpokename(); + } + + public static void syncDeleteSpokeSpokename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_spokename_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java new file mode 100644 index 00000000..3ca21840 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/deletespoke/SyncDeleteSpokeString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeString { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeString(); + } + + public static void syncDeleteSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_deletespoke_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/AsyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/AsyncGetHub.java new file mode 100644 index 00000000..623ae49d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/AsyncGetHub.java @@ -0,0 +1,44 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; + +public class AsyncGetHub { + + public static void main(String[] args) throws Exception { + asyncGetHub(); + } + + public static void asyncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + ApiFuture future = hubServiceClient.getHubCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHub.java new file mode 100644 index 00000000..e32c1239 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHub.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + Hub response = hubServiceClient.getHub(request); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubHubname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubHubname.java new file mode 100644 index 00000000..28e89f6f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubHubname.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_hubname_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; + +public class SyncGetHubHubname { + + public static void main(String[] args) throws Exception { + syncGetHubHubname(); + } + + public static void syncGetHubHubname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_hubname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubString.java new file mode 100644 index 00000000..f0016ed6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/gethub/SyncGetHubString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubName; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; + +public class SyncGetHubString { + + public static void main(String[] args) throws Exception { + syncGetHubString(); + } + + public static void syncGetHubString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_gethub_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/AsyncGetSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/AsyncGetSpoke.java new file mode 100644 index 00000000..095e30d9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/AsyncGetSpoke.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; + +public class AsyncGetSpoke { + + public static void main(String[] args) throws Exception { + asyncGetSpoke(); + } + + public static void asyncGetSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + ApiFuture future = hubServiceClient.getSpokeCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpoke.java new file mode 100644 index 00000000..39098970 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpoke.java @@ -0,0 +1,43 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_sync] +import com.google.cloud.networkconnectivity.v1alpha1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; + +public class SyncGetSpoke { + + public static void main(String[] args) throws Exception { + syncGetSpoke(); + } + + public static void syncGetSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + Spoke response = hubServiceClient.getSpoke(request); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java new file mode 100644 index 00000000..24c20d58 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeSpokename.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_spokename_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; + +public class SyncGetSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncGetSpokeSpokename(); + } + + public static void syncGetSpokeSpokename() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_spokename_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeString.java new file mode 100644 index 00000000..e396a135 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/getspoke/SyncGetSpokeString.java @@ -0,0 +1,39 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.SpokeName; + +public class SyncGetSpokeString { + + public static void main(String[] args) throws Exception { + syncGetSpokeString(); + } + + public static void syncGetSpokeString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_getspoke_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubs.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubs.java new file mode 100644 index 00000000..64e88473 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubs.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class AsyncListHubs { + + public static void main(String[] args) throws Exception { + asyncListHubs(); + } + + public static void asyncListHubs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listHubsPagedCallable().futureCall(request); + // Do something. + for (Hub element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubsPaged.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubsPaged.java new file mode 100644 index 00000000..a2b6a184 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/AsyncListHubsPaged.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_paged_async] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1alpha1.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListHubsPaged { + + public static void main(String[] args) throws Exception { + asyncListHubsPaged(); + } + + public static void asyncListHubsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHubsResponse response = hubServiceClient.listHubsCallable().call(request); + for (Hub element : response.getHubsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubs.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubs.java new file mode 100644 index 00000000..a74c8ed0 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubs.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncListHubs { + + public static void main(String[] args) throws Exception { + syncListHubs(); + } + + public static void syncListHubs() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Hub element : hubServiceClient.listHubs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsLocationname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsLocationname.java new file mode 100644 index 00000000..6f11aa8c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsLocationname.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_locationname_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncListHubsLocationname { + + public static void main(String[] args) throws Exception { + syncListHubsLocationname(); + } + + public static void syncListHubsLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsString.java new file mode 100644 index 00000000..fddea0d6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listhubs/SyncListHubsString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; + +public class SyncListHubsString { + + public static void main(String[] args) throws Exception { + syncListHubsString(); + } + + public static void syncListHubsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listhubs_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokes.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokes.java new file mode 100644 index 00000000..e9bab3fd --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokes.java @@ -0,0 +1,52 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class AsyncListSpokes { + + public static void main(String[] args) throws Exception { + asyncListSpokes(); + } + + public static void asyncListSpokes() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listSpokesPagedCallable().futureCall(request); + // Do something. + for (Spoke element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokesPaged.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokesPaged.java new file mode 100644 index 00000000..cf62491f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/AsyncListSpokesPaged.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_paged_async] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1alpha1.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.common.base.Strings; + +public class AsyncListSpokesPaged { + + public static void main(String[] args) throws Exception { + asyncListSpokesPaged(); + } + + public static void asyncListSpokesPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request); + for (Spoke element : response.getSpokesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokes.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokes.java new file mode 100644 index 00000000..f1a48606 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokes.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncListSpokes { + + public static void main(String[] args) throws Exception { + syncListSpokes(); + } + + public static void syncListSpokes() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesLocationname.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesLocationname.java new file mode 100644 index 00000000..c248998b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesLocationname.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_locationname_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncListSpokesLocationname { + + public static void main(String[] args) throws Exception { + syncListSpokesLocationname(); + } + + public static void syncListSpokesLocationname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesString.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesString.java new file mode 100644 index 00000000..a0b5f2f3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/listspokes/SyncListSpokesString.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_string_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.LocationName; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; + +public class SyncListSpokesString { + + public static void main(String[] args) throws Exception { + syncListSpokesString(); + } + + public static void syncListSpokesString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_listspokes_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHub.java new file mode 100644 index 00000000..6376e418 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHub.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHub { + + public static void main(String[] args) throws Exception { + asyncUpdateHub(); + } + + public static void asyncUpdateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java new file mode 100644 index 00000000..860fa82f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/AsyncUpdateHubLRO.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHubLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateHubLRO(); + } + + public static void asyncUpdateHubLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHub.java new file mode 100644 index 00000000..89bb0164 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHub { + + public static void main(String[] args) throws Exception { + syncUpdateHub(); + } + + public static void syncUpdateHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.updateHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java new file mode 100644 index 00000000..5e8021d3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatehub/SyncUpdateHubHubFieldmask.java @@ -0,0 +1,40 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_hubfieldmask_sync] +import com.google.cloud.networkconnectivity.v1alpha1.Hub; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHubHubFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateHubHubFieldmask(); + } + + public static void syncUpdateHubHubFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Hub hub = Hub.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatehub_hubfieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java new file mode 100644 index 00000000..c87a1dfb --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpoke.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + asyncUpdateSpoke(); + } + + public static void asyncUpdateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java new file mode 100644 index 00000000..fb779239 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/AsyncUpdateSpokeLRO.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSpokeLRO(); + } + + public static void asyncUpdateSpokeLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpoke.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpoke.java new file mode 100644 index 00000000..6f73e417 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpoke.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.cloud.networkconnectivity.v1alpha1.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + syncUpdateSpoke(); + } + + public static void syncUpdateSpoke() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.updateSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java new file mode 100644 index 00000000..e8d03127 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubserviceclient/updatespoke/SyncUpdateSpokeSpokeFieldmask.java @@ -0,0 +1,40 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_spokefieldmask_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceClient; +import com.google.cloud.networkconnectivity.v1alpha1.Spoke; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpokeSpokeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSpokeSpokeFieldmask(); + } + + public static void syncUpdateSpokeSpokeFieldmask() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Spoke spoke = Spoke.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get(); + } + } +} +// [END networkconnectivity_v1alpha1_generated_hubserviceclient_updatespoke_spokefieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubservicesettings/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubservicesettings/gethub/SyncGetHub.java new file mode 100644 index 00000000..1a609680 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/hubservicesettings/gethub/SyncGetHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.samples; + +// [START networkconnectivity_v1alpha1_generated_hubservicesettings_gethub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.HubServiceSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HubServiceSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1alpha1_generated_hubservicesettings_gethub_sync] diff --git a/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/stub/hubservicestubsettings/gethub/SyncGetHub.java b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/stub/hubservicestubsettings/gethub/SyncGetHub.java new file mode 100644 index 00000000..09d608b4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/networkconnectivity/v1alpha1/stub/hubservicestubsettings/gethub/SyncGetHub.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * https://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.google.cloud.networkconnectivity.v1alpha1.stub.samples; + +// [START networkconnectivity_v1alpha1_generated_hubservicestubsettings_gethub_sync] +import com.google.cloud.networkconnectivity.v1alpha1.stub.HubServiceStubSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + HubServiceStubSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1alpha1_generated_hubservicestubsettings_gethub_sync] From 88c9937e43c25c3c82194b9cdc57525950b85303 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Jul 2022 20:58:18 +0200 Subject: [PATCH 5/8] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.3 (#277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![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-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.5.2` -> `1.5.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/compatibility-slim/1.5.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/confidence-slim/1.5.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.5.3`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​153-httpsgithubcomgoogleapisjava-shared-configcomparev152v153-2022-07-27) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.5.2...v1.5.3) ##### Dependencies - update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#​497](https://togithub.com/googleapis/java-shared-config/issues/497)) ([1fc6ab4](https://togithub.com/googleapis/java-shared-config/commit/1fc6ab445624cd4f9c8b161d109f346a9e5ed09a)) - Update doclet to latest version 1.6.0 ([38fb7c3](https://togithub.com/googleapis/java-shared-config/commit/38fb7c3957fb6c9b2da10f9e463cc93a8b80a3a4))
--- ### 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-networkconnectivity). --- google-cloud-networkconnectivity-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-networkconnectivity-bom/pom.xml b/google-cloud-networkconnectivity-bom/pom.xml index d8c6a84b..70e5d614 100644 --- a/google-cloud-networkconnectivity-bom/pom.xml +++ b/google-cloud-networkconnectivity-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.2 + 1.5.3 Google Network Connectivity Center BOM diff --git a/pom.xml b/pom.xml index a6e28287..c8a68783 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.2 + 1.5.3 From f63ae405d7f1a207d9eee1bcc976dafbb916fda1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 21:04:26 +0200 Subject: [PATCH 6/8] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3 (#278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![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-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.13.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) ### [`v3.0.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2130v300-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.13.0...v3.0.0) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-shared-dependencies/issues/1485)) ([#​738](https://togithub.com/googleapis/java-shared-dependencies/issues/738)) ([11bc8f8](https://togithub.com/googleapis/java-shared-dependencies/commit/11bc8f81f28be88a97fdeafca21724e33638770c)) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#​729](https://togithub.com/googleapis/java-shared-dependencies/issues/729)) ([1fa59af](https://togithub.com/googleapis/java-shared-dependencies/commit/1fa59af80abb9f278f57658c10158567e825fec6)) - update dependency com.google.api-client:google-api-client-bom to v2 ([#​746](https://togithub.com/googleapis/java-shared-dependencies/issues/746)) ([2dcb2e0](https://togithub.com/googleapis/java-shared-dependencies/commit/2dcb2e071e0ba0eea21bb575bd13cd559d4a1ca6)) - update dependency com.google.api.grpc:grpc-google-common-protos to v2.9.2 ([#​741](https://togithub.com/googleapis/java-shared-dependencies/issues/741)) ([3352d6c](https://togithub.com/googleapis/java-shared-dependencies/commit/3352d6c36111c04e3f6f3e6360470fa3efb10d8f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.0 ([#​726](https://togithub.com/googleapis/java-shared-dependencies/issues/726)) ([2c5d64c](https://togithub.com/googleapis/java-shared-dependencies/commit/2c5d64c127db8384e49113acfeac6928716a2d7f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​742](https://togithub.com/googleapis/java-shared-dependencies/issues/742)) ([4f53527](https://togithub.com/googleapis/java-shared-dependencies/commit/4f53527bda7f40896711b7c1d1c02453321ffbc8)) - update dependency com.google.cloud:first-party-dependencies to v2 ([#​747](https://togithub.com/googleapis/java-shared-dependencies/issues/747)) ([e970ac0](https://togithub.com/googleapis/java-shared-dependencies/commit/e970ac0599941c825dc2516146a7c6673e68a9b9)) - update dependency com.google.cloud:grpc-gcp to v1.2.1 ([#​751](https://togithub.com/googleapis/java-shared-dependencies/issues/751)) ([b3284b6](https://togithub.com/googleapis/java-shared-dependencies/commit/b3284b6ee52a96a6ea8696a05a94443df9ee5b9f)) - update dependency com.google.cloud:third-party-dependencies to v2 ([#​748](https://togithub.com/googleapis/java-shared-dependencies/issues/748)) ([573b41a](https://togithub.com/googleapis/java-shared-dependencies/commit/573b41a69504372741cbeb01dd200e7c71967186)) - update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#​730](https://togithub.com/googleapis/java-shared-dependencies/issues/730)) ([6b47126](https://togithub.com/googleapis/java-shared-dependencies/commit/6b47126686b603a5d112e097ce6aa3a1880daf6f)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​749](https://togithub.com/googleapis/java-shared-dependencies/issues/749)) ([299d7b0](https://togithub.com/googleapis/java-shared-dependencies/commit/299d7b0d4920644e2c3070d12dd1d97da17a5e88)) - update dependency com.google.protobuf:protobuf-bom to v3.21.2 ([#​722](https://togithub.com/googleapis/java-shared-dependencies/issues/722)) ([7a96b12](https://togithub.com/googleapis/java-shared-dependencies/commit/7a96b1259a526b63e9376fd6cc18b27cddeb5f0f)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​756](https://togithub.com/googleapis/java-shared-dependencies/issues/756)) ([3d0bac2](https://togithub.com/googleapis/java-shared-dependencies/commit/3d0bac23487aebb94267c0708f41ff6c02a028a4)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​759](https://togithub.com/googleapis/java-shared-dependencies/issues/759)) ([5a54ef1](https://togithub.com/googleapis/java-shared-dependencies/commit/5a54ef1a2d56244166d4fcc46041d62c0dc4b411)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​752](https://togithub.com/googleapis/java-shared-dependencies/issues/752)) ([20ac908](https://togithub.com/googleapis/java-shared-dependencies/commit/20ac908932a5e7c8e581bdfcd68579d7e1cedd5f)) - update dependency org.checkerframework:checker-qual to v3.23.0 ([#​736](https://togithub.com/googleapis/java-shared-dependencies/issues/736)) ([fc01d8f](https://togithub.com/googleapis/java-shared-dependencies/commit/fc01d8f93f391f12fdb800d5006f0b4505832eeb)) - update gax.version to v2.18.3 ([#​731](https://togithub.com/googleapis/java-shared-dependencies/issues/731)) ([e8ee554](https://togithub.com/googleapis/java-shared-dependencies/commit/e8ee554707acb2f71c739d08e2ff02fbe43ffa52)) - update gax.version to v2.18.4 ([#​735](https://togithub.com/googleapis/java-shared-dependencies/issues/735)) ([11c7415](https://togithub.com/googleapis/java-shared-dependencies/commit/11c74152a84697924de3a0e838b05f606c3098f7)) - update gax.version to v2.18.5 ([#​758](https://togithub.com/googleapis/java-shared-dependencies/issues/758)) ([7469fc1](https://togithub.com/googleapis/java-shared-dependencies/commit/7469fc1cc5095b39a5738e60156711a268f6e052)) - update gax.version to v2.18.6 ([#​763](https://togithub.com/googleapis/java-shared-dependencies/issues/763)) ([b5ca2f7](https://togithub.com/googleapis/java-shared-dependencies/commit/b5ca2f7b4d81c705823253f4f03363a32d2be48b)) - update google.common-protos.version to v2.9.1 ([#​724](https://togithub.com/googleapis/java-shared-dependencies/issues/724)) ([5213dbb](https://togithub.com/googleapis/java-shared-dependencies/commit/5213dbbfa9c9b73d2420ec2be7782f16c9c4955f)) - update google.core.version to v2.8.1 ([#​725](https://togithub.com/googleapis/java-shared-dependencies/issues/725)) ([575858a](https://togithub.com/googleapis/java-shared-dependencies/commit/575858a60f76e46bbc2a2435c2b6c01c8f4ab681)) - update google.core.version to v2.8.3 ([#​760](https://togithub.com/googleapis/java-shared-dependencies/issues/760)) ([cb10ae4](https://togithub.com/googleapis/java-shared-dependencies/commit/cb10ae4b76939215ea465af74163b3d4ad65a548)) - update google.core.version to v2.8.4 ([#​762](https://togithub.com/googleapis/java-shared-dependencies/issues/762)) ([821daaf](https://togithub.com/googleapis/java-shared-dependencies/commit/821daafefdbcfdfe6e363e580747538096a562ef)) - update google.core.version to v2.8.5 ([#​764](https://togithub.com/googleapis/java-shared-dependencies/issues/764)) ([a1f8f50](https://togithub.com/googleapis/java-shared-dependencies/commit/a1f8f501b54143a2cec8e72efd4ceb3ce47f13ae)) - update iam.version to v1.5.0 ([#​732](https://togithub.com/googleapis/java-shared-dependencies/issues/732)) ([9dce0e5](https://togithub.com/googleapis/java-shared-dependencies/commit/9dce0e5199c1e425119adc804304958f58003a27)) - update iam.version to v1.5.1 ([#​737](https://togithub.com/googleapis/java-shared-dependencies/issues/737)) ([df39168](https://togithub.com/googleapis/java-shared-dependencies/commit/df391685d42fcb1b04f03ab1380a594893bdce37)) - update iam.version to v1.5.2 ([#​743](https://togithub.com/googleapis/java-shared-dependencies/issues/743)) ([cdde697](https://togithub.com/googleapis/java-shared-dependencies/commit/cdde697f25a89fc8c2ec7eae6b7c54f69977bb1c))
--- ### 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-networkconnectivity). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8a68783..83fce0e8 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.13.0 + 3.0.1 pom import From 4f8aeae424e01a1b34c244318fb07a96ceb78d19 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 05:02:15 +0000 Subject: [PATCH 7/8] chore(main): release 1.2.3-SNAPSHOT (#271) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-networkconnectivity-bom/pom.xml | 12 ++++++------ google-cloud-networkconnectivity/pom.xml | 4 ++-- grpc-google-cloud-networkconnectivity-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-networkconnectivity-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-networkconnectivity-bom/pom.xml b/google-cloud-networkconnectivity-bom/pom.xml index 70e5d614..c5cc3923 100644 --- a/google-cloud-networkconnectivity-bom/pom.xml +++ b/google-cloud-networkconnectivity-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity-bom - 1.2.2 + 1.2.3-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/google-cloud-networkconnectivity/pom.xml b/google-cloud-networkconnectivity/pom.xml index 32791dc3..46b75d80 100644 --- a/google-cloud-networkconnectivity/pom.xml +++ b/google-cloud-networkconnectivity/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity - 1.2.2 + 1.2.3-SNAPSHOT jar Google Network Connectivity Center https://github.com/googleapis/java-networkconnectivity @@ -11,7 +11,7 @@ com.google.cloud google-cloud-networkconnectivity-parent - 1.2.2 + 1.2.3-SNAPSHOT google-cloud-networkconnectivity diff --git a/grpc-google-cloud-networkconnectivity-v1/pom.xml b/grpc-google-cloud-networkconnectivity-v1/pom.xml index ac47b3fe..130a3e34 100644 --- a/grpc-google-cloud-networkconnectivity-v1/pom.xml +++ b/grpc-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT grpc-google-cloud-networkconnectivity-v1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml b/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml index 1496b869..aaff5cc0 100644 --- a/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT grpc-google-cloud-networkconnectivity-v1alpha1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index 83fce0e8..b89ac540 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-networkconnectivity-parent pom - 1.2.2 + 1.2.3-SNAPSHOT Google Network Connectivity Center Parent https://github.com/googleapis/java- @@ -61,27 +61,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT diff --git a/proto-google-cloud-networkconnectivity-v1/pom.xml b/proto-google-cloud-networkconnectivity-v1/pom.xml index ec779768..2cc4bbb4 100644 --- a/proto-google-cloud-networkconnectivity-v1/pom.xml +++ b/proto-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.2 + 1.2.3-SNAPSHOT proto-google-cloud-networkconnectivity-v1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml b/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml index 80e92c29..66609e43 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.2 + 0.8.3-SNAPSHOT proto-google-cloud-networkconnectivity-v1alpha1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/versions.txt b/versions.txt index 196a48f6..d001eb92 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-networkconnectivity:1.2.2:1.2.2 -grpc-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.2 -grpc-google-cloud-networkconnectivity-v1:1.2.2:1.2.2 -proto-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.2 -proto-google-cloud-networkconnectivity-v1:1.2.2:1.2.2 +google-cloud-networkconnectivity:1.2.2:1.2.3-SNAPSHOT +grpc-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.3-SNAPSHOT +grpc-google-cloud-networkconnectivity-v1:1.2.2:1.2.3-SNAPSHOT +proto-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.3-SNAPSHOT +proto-google-cloud-networkconnectivity-v1:1.2.2:1.2.3-SNAPSHOT From e1befefb5ce0776fdd045c1776cfe6ecfd505051 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 05:20:15 +0000 Subject: [PATCH 8/8] chore(main): release 1.2.3 (#279) :robot: I have created a release *beep* *boop* --- ## [1.2.3](https://github.com/googleapis/java-networkconnectivity/compare/v1.2.2...v1.2.3) (2022-08-09) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#278](https://github.com/googleapis/java-networkconnectivity/issues/278)) ([f63ae40](https://github.com/googleapis/java-networkconnectivity/commit/f63ae405d7f1a207d9eee1bcc976dafbb916fda1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-networkconnectivity-bom/pom.xml | 12 ++++++------ google-cloud-networkconnectivity/pom.xml | 4 ++-- grpc-google-cloud-networkconnectivity-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-networkconnectivity-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b29b449..5ec662af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.3](https://github.com/googleapis/java-networkconnectivity/compare/v1.2.2...v1.2.3) (2022-08-09) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#278](https://github.com/googleapis/java-networkconnectivity/issues/278)) ([f63ae40](https://github.com/googleapis/java-networkconnectivity/commit/f63ae405d7f1a207d9eee1bcc976dafbb916fda1)) + ## [1.2.2](https://github.com/googleapis/java-networkconnectivity/compare/v1.2.1...v1.2.2) (2022-07-13) diff --git a/google-cloud-networkconnectivity-bom/pom.xml b/google-cloud-networkconnectivity-bom/pom.xml index c5cc3923..1171075d 100644 --- a/google-cloud-networkconnectivity-bom/pom.xml +++ b/google-cloud-networkconnectivity-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity-bom - 1.2.3-SNAPSHOT + 1.2.3 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/google-cloud-networkconnectivity/pom.xml b/google-cloud-networkconnectivity/pom.xml index 46b75d80..acd6b08d 100644 --- a/google-cloud-networkconnectivity/pom.xml +++ b/google-cloud-networkconnectivity/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-networkconnectivity - 1.2.3-SNAPSHOT + 1.2.3 jar Google Network Connectivity Center https://github.com/googleapis/java-networkconnectivity @@ -11,7 +11,7 @@ com.google.cloud google-cloud-networkconnectivity-parent - 1.2.3-SNAPSHOT + 1.2.3 google-cloud-networkconnectivity diff --git a/grpc-google-cloud-networkconnectivity-v1/pom.xml b/grpc-google-cloud-networkconnectivity-v1/pom.xml index 130a3e34..35abcccd 100644 --- a/grpc-google-cloud-networkconnectivity-v1/pom.xml +++ b/grpc-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 grpc-google-cloud-networkconnectivity-v1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml b/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml index aaff5cc0..70f8489e 100644 --- a/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/grpc-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 grpc-google-cloud-networkconnectivity-v1alpha1 GRPC library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/pom.xml b/pom.xml index b89ac540..0093749d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-networkconnectivity-parent pom - 1.2.3-SNAPSHOT + 1.2.3 Google Network Connectivity Center Parent https://github.com/googleapis/java- @@ -61,27 +61,27 @@ com.google.cloud google-cloud-networkconnectivity - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 com.google.api.grpc grpc-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 diff --git a/proto-google-cloud-networkconnectivity-v1/pom.xml b/proto-google-cloud-networkconnectivity-v1/pom.xml index 2cc4bbb4..dddb8a46 100644 --- a/proto-google-cloud-networkconnectivity-v1/pom.xml +++ b/proto-google-cloud-networkconnectivity-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1 - 1.2.3-SNAPSHOT + 1.2.3 proto-google-cloud-networkconnectivity-v1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml b/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml index 66609e43..1576825d 100644 --- a/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml +++ b/proto-google-cloud-networkconnectivity-v1alpha1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 - 0.8.3-SNAPSHOT + 0.8.3 proto-google-cloud-networkconnectivity-v1alpha1 Proto library for google-cloud-networkconnectivity com.google.cloud google-cloud-networkconnectivity-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/versions.txt b/versions.txt index d001eb92..0228a784 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-networkconnectivity:1.2.2:1.2.3-SNAPSHOT -grpc-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.3-SNAPSHOT -grpc-google-cloud-networkconnectivity-v1:1.2.2:1.2.3-SNAPSHOT -proto-google-cloud-networkconnectivity-v1alpha1:0.8.2:0.8.3-SNAPSHOT -proto-google-cloud-networkconnectivity-v1:1.2.2:1.2.3-SNAPSHOT +google-cloud-networkconnectivity:1.2.3:1.2.3 +grpc-google-cloud-networkconnectivity-v1alpha1:0.8.3:0.8.3 +grpc-google-cloud-networkconnectivity-v1:1.2.3:1.2.3 +proto-google-cloud-networkconnectivity-v1alpha1:0.8.3:0.8.3 +proto-google-cloud-networkconnectivity-v1:1.2.3:1.2.3